Grouping for Unique Rows
There are many situations in which you may need to use only unique rows, for instance, to populate an Input Select List element. This can be done with grouping, as the following example illustrates:
- As shown above, a Group Filter element is added as a child to the datalayer element.
- Its Group Column attribute is set to the name of a column in the datalayer. The data will be grouped based on the values in this column.
- Its Data Type column is set to the data type of the column named in the Group Column attribute. This ensures unambiguous ordering of the data and, though optional, setting it is recommended.
- The Keep Grouped Rows attribute is left blank; its default value is False. This causes all rows after the first one in each group to be removed from the datalayer, creating a list of unique values.
The resulting output is shown above. The rows are grouped by CategoryID and only one row exists for each category.