| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > FormVCRClass > FormVCRClass Methods >====== SetSort (apply a sort order to the FormVCR group) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[setrequestcontrol assign field equates to formvcr actions .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setvcrcontrols assign field equates to formvcr scrolling .htm|{{btn_next_n.gif|Next page}}]] | | || **SetSort( **//order//**, **//force reset //**), VIRTUAL, PROC** {{blk2blue.jpg|blk2blue.jpg}} | **SetSort** | Applies a specified sort order to the FormVCR group. | | //order// | An integer constant, variable, EQUATE, or expression that specifies the sort order to apply. | | //force reset// | A numeric constant, variable, EQUATE, or expression that tells the method whether to reset the FormVCR conditionally or unconditionally. A value of zero (0 or False) resets the FormVCR only if circumstances require (sort order changed, reset fields changed, first time loading); a value of one (1 or True) unconditionally resets the FormVCR. | The **SetSort **method applies the specified sort //order //to the FormVCR group and returns one (1) if the sort order changed; it returns zero (0) if the sort order did not change. Any range limits, locators, and reset fields associated with the sort order are enabled and applied. The //order //value is typically a value returned by the ViewManager's AddSortOrder method which identifies the particular sort order. Since AddSortOrder returns sequence numbers, a value of one (1) applies the sort order specified by the first call to AddSortOrder; two (2) applies the sort order specified by the next call to AddSortOrder; etc. A value of zero (0) applies the default sort order. **Implementation:** The ResetSort method calls the SetSort method. **Return Data Type:**     BYTE