Sorting a table in ascending or descending order is easy and build in to the Webi tool, but what about changing the sort from Ascending to descending or vise
versa dynamically?
We can achieve this fairly easily by maintaining 2 hidden columns and 2 variables that are based on a common input control.
That's it! using the input control, you can dynamically change how the table is sorted.
NOTE: this works for numerical value well, you can have the sorting columns populate with any number of values as long as they are numbers
and not strings. Separate sorting column should be used for strings. If you try to use a string variable and number variable in the same column, the tool will
sort the number values by their character value instead of their numerical value
To Sort dynamically on more than one data type (strings, dates, numbers, etc...), you can create 2 blank cells for each data type. Then create 1 variable to hold each data type and insert it into the 2 blank cells for that data type. Set one of each data type's cells to sort ascending, and other to descending. Add logic to those cells based on the input control selection for ascending vs descending to either show the contents of the variable, or null.
Create another input control to control what to break/section on and have that variable's content control what datatype cells are populated.
NOTE: Removing All Sorts from the section first is sometimes required for the dynamic breaking/sectioning/sorting to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
10 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 |