Salesforce

How Do I Dynamically Define the Data View Sort? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Dynamically Define the Data View Sort? (Magic xpa 4.x)

Magic xpa has powerful built-in sorting abilities. You can easily customize these for your end users using the SortAdd() and SortReset() functions.

  1. Create a system to hold the sort order. In the example, each field is assigned a number between 1 and 3. A loop cycles 3 times, executing a SortAdd() for each field that matches the LoopCounter().

  2. Create variables to hold the choice of Ascending or Descending.

  3. Execute SortAdd() once for each field that will be added to the sort.

  4. Raise the View Refresh event.

Use the SortReset() function to undo the Sort.

See also

The Online and Rich Client Samples projects (program DV15 and RDV15)

Reference
Attachment 
Attachment