User Guide : Designing and Executing Map : Setting Up Source Data : Defining Sort Options
 
Share this page                  
Defining Sort Options
You can specify the sort options for non-hierarchal source data that use only one record type. The sort operation occurs at run-time (that is, when you run the map.
To define the sort options for the source data:
1. In the map file, go to the Sources tab > Define Sort Options section.
2. Click /download/attachments/23921988/Map_Source_Add_Icon.png?version=1&modificationDate=1484737955069&api=v2 to add the sort options.
A table with the following columns appear:
Fields - Specify the sort keys.
Ascending - Specify the sort order.
Data Type - Specify the data type.
Length - Specify the field length.
3. In the Field column, click within the cell and from the drop-down list, do any of the following to specify the sort key:
Select an existing field and then you can change the name manually.
Click /download/attachments/24975457/SelectIcon_WithinField.png?version=1&modificationDate=1487964313321&api=v2 to open the EZScript Expressions editor and create an expression.
4. In the Ascending column, click within the field and from the drop-down list, select one of the following:
True - Set the sort order to ascending.
False - Set the sort order to descending.
The default value is True.
5. In the Data Type column, click within the cell and from the drop-down list, select one of the following to specify the data type to be used for the sort order:
Float
Decimal
Name
Short
Text
The default value is Text.
6. In Length, type a value to specify the key prefix length. This is optional. If this is set, it determines the prefix length of the key to be used in sorting. If this is not set, the value 1 is used.
7. To add additional sort keys, click /download/attachments/23921988/Map_Source_Add_Icon.png?version=1&modificationDate=1484737955069&api=v2 and repeat the steps 3 to 6.
8. To delete the sort key:
a. Click /download/attachments/23921988/Map_Source_Delete_Icon.png?version=1&modificationDate=1484737955085&api=v2.
A message appears asking for confirmation.
b. Click Yes.
The sort key row is removed from the Define Sort Options section.
9. Select the Allow duplicate records option if you want to include duplicate records. Else, clear this option. By default, it is selected.
10. Click Save.
The sort options are saved.