Salesforce

How Do I Dynamically Change the Display Order of Records in a Program? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Dynamically Change the Display Order of Records in a Program? (Magic xpa 3.x)

The record display order can be determined two ways: by creating a runtime Sort in the Sort window or, more commonly, by selecting different indexes in the properties of the Main Source. In this example, we selected Index 1, so the records will be sorted by the Customer Code.

However, you can also set the index dynamically, using an expression. This is commonly done so the user can change the display order of a table, or to optimize processing time depending on what filters the user chose for a report.

Using an expression for an index

  1. Go to Data View, and position on the Main Source. Press Alt+Enter. You will be on the Properties of Main Source.

  2. Type 0 (zero) in the Index field. That will allow you to tab over to the right, where the index expression can be coded.

  3. Zoom from the index expression, or press the fx button.

  4. Enter your index expression. Here we are selecting index 1 if the sort order is ā€˜Iā€™ (for ID); otherwise we use index 2. Using the format '1'INDEX ensures that if the indexes are moved in the data source, the expression will remain correct.

  5. Click OK, which will bring the expression number back to the properties pane.

Note: Users also have the option of clicking on a column header to change the sort order of displayed records, or creating their own sort order using Ctrl+T (Options->Sort Records) when using the End User Functionality component.

See also

Reference
Attachment 
Attachment