| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ViewManager > ViewManager Methods >====== ApplyFilter (range limit and filter the result set) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[appendorder refine a sort order .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[applyorder sort the result set .htm|{{btn_next_n.gif|Next page}}]] | | || **ApplyFilter, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} The **ApplyFilter **method applies the range limits and filter for the active sort order to the managed VIEW. The filter applies starting with the next read. The AddSortOrder and SetSort methods set the active sort order. The SetFilter method sets filter expression. **Implementation:** The ViewManager implements range limits and filters with the VIEW's [[filter set view filter expression .htm|FILTER]] attribute. See the //Language Reference// for more information. **Example:** ** MyView.AddSortOrder(ORD:ByCustomer)                       !sort by customer no** ** MyView.AddRange(ORD:CustNo,Relate:Orders,Relate:Customer) !range limit by parent file** ** MyView.SetFilter( '(CUST:Name>''T'')' )                   !set customer name filter** ** !program code** ** MyView.ApplyFilter                                        !apply the filter** ** MyView.Next()                                             !get next subject to filter** **See Also:**     [[setfilter add change or remove active filter .htm|SetFilter]], [[setsort set the active sort order .htm|SetSort]]