How to add a reverse sort order to a browse

Top  Previous  Next

To implement a reverse sort order to a template-generated listbox is a simple process of populating a tab, and setting the conditional behavior using the Additional Sort order option.


Set up a new tab from the Window Designer:


Click on (select)the SHEET control.


From the Properties Pad, add a new Tab Control.


Change the text property of the TAB to "Reverse Order" or the text you want to display on the tab.


Set up the list box to work with the new tab:


RIGHT CLICK on the list control and choose Actions from the popup menu.


Select the Conditional Behavior tab.


Press the Insert button.


Type CHOICE(?CurrentTab) = n (where n = the number of the Reverse Order tab) in the condition entry field.


TYPE -FIL:FieldName (where FIL:FieldName is the label of the reverse sorted field) in the additional sort field entry field. (Notice the minus (-) sign before the field name)

Note: For a case insensitive sort, use -UPPER(FIL:Fieldname)


Press the OK button to close the list box Actions, and Save and Close to exit the Window Designer.

This sets the new tab to sort the list in the reverse order of the field specified.