Technical Support

Sort Column Area Procedure

Occasionally it becomes necessary to re-sort the column area of a form. A built-in VersaForm procedure called "colsort" allows you to sort by up to three (3) columns. Here is an example that would sort the column area by the "Date" field first and, if the date is the same, by the "Code" field second.

Mdcsdesk00000118.gif 

After the open parentheses the first item is the file - "a" (the first open file). The next item is the name of the first sort field - "Date", after that is the order of the sort (+ for ascending, - for descending) - "+". The next two items are for the sort order under date (two or more dates that are the same), and the last two items would be the sort order under "Code" (two or more "Codes" that are the same).

Here is the same procedure re-written to sort the column area first by "Code" and then "Date":

Mdcsdesk00000119.gif 

Use these examples to create procedures to sort your column areas to meet your needs.

Related Topics:

Eachform

How to enter procedures

Copying a procedure

Email your support questions to tech@versaform.com

This information is provided as a courtesy.  VersaForm Systems Corporation has provided this information "AS IS" without warranty of any kind – express or implied.  In no event shall VersaForm Systems Corporation be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.