Using TabReference with one of the *All tags options in dynamic row/column definition will feed the Grid with all the responses from the given query in exactly the same order as they are displayed in the Query results. For reporting purposes, it is often necessary to adjust the list of responses by limiting, extending, or reordering it before it is shown on the slide in the Grid.
There are several functions available in the expressions manager that enable options for this kind of data manipulation. These functions usually take a Table (for example a result of a TabReference with *All tag) as an input and process it, returning a modified Table object as an output. Let’s go through some specific examples of how those can be utilized.
Probably the most common use case for manipulation of the original data is applying a sort order. Even if the input Query does not have any sorting applied, it can be integrated into dynamic/row column definition by using the Sort function, which we already mentioned when discussing dependent rows.
In this example, let’s take the Query with Overall product satisfaction for makes in the two most recent years that we prepared earlier.
When creating a dynamic row, we can decide from which year the values will be included in the results (we can also decide by giving position rather than the label). Once we have defined the table by using the TabReference, we can sort it by any of the columns (ID, label, value). This way we can, e.g., ensure alphabetical order.
When we leave Edit mode, we see that this order is now used on our Grid - the 2020 value sorts rows.