| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > ViewManager > ViewManager Methods >====== ApplyOrder (sort the result set) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[applyfilter range limit and filter the result set .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[applyrange conditionally range limit and filter the result set .htm|{{btn_next_n.gif|Next page}}]] | | || **ApplyOrder, VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} The **ApplyOrder **method applies the active sort order to the managed VIEW. The order applies starting with the next read from the VIEW. The AddSortOrder method sets the available sort orders.The SetSort method sets the active sort order. **Implementation:** The ViewManager implements sort orders with the VIEW's [[order set view sort order expression .htm|ORDER]] attribute. See the //Language Reference //for more information. **Example:** ** MyView.AddSortOrder(ORD:ByCustomer) !sort by customer no** ** !program code** ** MyView.ApplyOrder                   !apply the order** ** MyView.Next()                       !get next in specified order** **See Also:     **[[addsortorder add a sort order .htm|AddSortOrder]], [[setsort set the active sort order .htm|SetSort]]