Navigation: ABC Library Reference > ViewManager > ViewManager Methods >====== ApplyFilter (range limit and filter the result set) ====== | |
ApplyFilter, VIRTUAL
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 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