The sort order of a block with multiple records can be set up so that it can be changed during runtime. The following steps should be completed.
In the Studio, either select an existing label or create a label or button that will contain the code to change the order by on the database block.
In the Hyperlink To property, enter ChangeOrderBy('BLOCK.FIELD'), where BLOCK.FIELD is the block that needs to be resorted and the field by which it needs to be sorted.
The new order by will be combined with any existing order by so that the new order by is the first object in the sort and any additional order by comes after the new one.
Set the Hyperlink Scripted property to true.
Run the screen.
Click on the link(s) to re-sort the records. Records will be sorted in ascending order.
You can also use ChangeOrderByAsc('BLOCK.FIELD') to sort in ascending order or ChangeOrderByDesc('BLOCK.FIELD') to sort in descending order.
Xephr is a registered trademark of NDS Systems, LC.
Copyright