Change order by
From Plex-XML
You can change the sort order of a grid in two ways:
- Temporary
- Permanent
In this example the grid is initially ordered by "Employee Name" in ascending order. This is indicated by the red color of the label and the arrow beside the label.
Temporary change of the sort order
To change the sort order of a grid just temporary you can click on the label of a column. If you click once or twice on the label "Employee name" all records of this table within the database will be re-sorted in an ascending or descending order. If you click once or twice on the other labels "E-Mail" or "Hire Status" the resulting grid will be ordered by this column.
The resulting screens might look like this:
Please be aware of the fact that a re-sort by clicking the column label will only work for columns, that have been enabled in the format with the setting "Row sort" = YES. An application administrator might not allow this setting for every column in the grid. The decisions about this are depending on the number of records in the table and the available indexes for the column in the table.
Permanent change of the sort order
You can also do a permanent change of the sort order. For this you can use the format buttons in the lower left corner of the grid. After clicking on the right one of the two buttons you will get the following window:
There you can see a sort order number in brackets before the column "Employee Name". This indicates that the grid is ordered by the employee name. To change the order of the grid permanently to "E-Mail" two steps are necessary:
- Disable the order by "Employee Name". Click on the "Edit Field"
button next to "Employee Name" to get an new window shown below and change the "Order by No" from '1' to '0'
- Enable the order by "E-Mail". Click on the "Edit Field"
button next to "E-Mail" to get an new window shown below and change the "Order by No" from '0' to '1'
After hitting the save button in the format fields screen the resulting grid should be the same as shown in the section Temporary change of the sort order above. The difference is that the order is changed permanently and will occur each time the grid will be called with this format in the future.
Advanced settings
You can also use more than one field to qualify the sort order of a grid. The content in den field "Order by No" is used to generate the order by part of the SQL statement. This gives you the possibility to set different values for this attribute for different columns of the grid. In the current example you might want to set the value for the column "Hire status" to '1', the value for "Employee Name" to '2' and the value for "E-Mail" to '3'. The resulting grid will be ordered by
- "Hire status"
- "Employee Name"
- "E-Mail".






