Users can sort a field after they add it to a table. For a field in the rows, clicking the sort button next to the field name sorts alphabetically based on the labels. For example:
Initially the Area field is unsorted:
The first click sorts in ascending alphabetical order:
The second click sorts in descending alphabetical order:
In some cases it does not make sense to allow a field to be sorted into alphabetical order.
For example, you might have a date field containing months. It would not make sense to sort this alphabetically:
If you have fields in your data where this is the case, you can configure SuperWEB2 not to allow alphabetical sorting on these fields. Users will only be able to sort the field into the original order that was defined in the classification table when the SXV4 was built.
For example, if this configuration is applied to the Customer Open Month field:
The first click sorts in ascending classification order:
The second click sorts in descending classification order:
Prevent a Field from Sorting Alphabetically
This restriction is configured in SuperADMIN. Before starting to configure this setting, use the following command to check whether any current restrictions are defined:
<dataset_id> with the ID of the dataset you are setting rules for. SuperADMIN will either display a list of existing restrictions (if some are already defined), or display "not found".
Scenario A: No Existing Restrictions Defined
If there are no existing sorting restrictions defined, SuperADMIN displays the message "not found":
To prevent a field from sorting alphabetically, use the following command:
<dataset_id>is the ID of the dataset this rule applies to.
<index>is the index for this restriction. Each restriction has a unique index number, starting from zero.
<field_id>is the ID of the field this restriction applies to. Use the command
cat <dataset_id> <field_name>to find a field's ID.
For example, the following commands apply the sorting restriction to the Gender, Customer Open Date, and Customer Open Month fields on the bank dataset:
Scenario B: Existing Restrictions Defined
If there are already some sorting restrictions set for specific fields, then SuperADMIN displays the details. For example:
In this case there are three fields with sorting restrictions already defined. You can add a new restriction or update one of the existing ones:
To add a new sorting restriction for a different field, simply make sure that you use the next index value up. In this example there are already three rules, so to create a fourth you must use the index value of 3 (because the index numbering starts at 0). For example:
To update an existing sorting restriction, simply use the same index value as the existing restriction. For example to replace the restriction for Gender with a different field, use the index value 0:
Configure a Field to Sort Automatically into Ascending Classification Order
You can also optionally configure a field that has the sorting restriction to automatically sort into ascending classification order by default when it is added to a table.
To do this, add the
autoSort setting to the configuration, and set its value to
For example, suppose this is the current configuration:
If you wanted to configure automatic sorting on the Customer Open Calendar Date field (the second one in the configuration), you would use the following command: