Hi all,
Here is a tip on how to get multiple groupings in a query so you could have for example:
Group 1
Group 2
Data
The only thing with this script is the group template is not used (the group template is used to format the name of the group for example) so the group name will be: Group 1: Value of Group 1 (instead of just the value which is the way it works when using grouping from Aware). It is probably possible to define the group template but I haven´t dug into that yet, if anyone knows how to define the group template, please share the solution.
Add the following to the queries advanced (init) script and the field parameter is the group and just add multiple groups to get multiple groupings (nested):
NB: When using this above you have to add all columns you want (this above override all column settings set in the config tool) so in the code snippet above, the 2 first fields are for the grouping and they have the group header template as you can see. The last one is just for a row of data and the encoded parameter is added to enable html presentation in the query row).
PointsWell wrote:This is awesome and has fixed a whole bunch of issues I have been having with the lack of tabs within panels of a VP.
How do you render this to be collapsed on opening?
Not yet no, I did google it and it SEEMED a JS/Jquery simulated click was the only way BUT this may have been old information so may be possible now. I have no use for this solution yet for some time so will probably not dig into to it yet but if you find the solution please share . Thanks
PointsWell wrote:This is awesome and has fixed a whole bunch of issues I have been having with the lack of tabs within panels of a VP.
How do you render this to be collapsed on opening?
Not yet no, I did google it and it SEEMED a JS/Jquery simulated click was the only way BUT this may have been old information so may be possible now. I have no use for this solution yet for some time so will probably not dig into to it yet but if you find the solution please share . Thanks
The fix to this is to combine the Javascript with the Config Tool UI.
In the UI set the Group column and initially collapsed then in the JS create the conditions to group the multiple levels.
I have used the config.groupable="true" to allow user modification of the grouping condition.
The down side is that every time the user changes the grouping order it refreshes the grid and collapses everything again.
Screen Shot 2021-03-09 at 13.54.47.png (34.02 KiB) Viewed 59223 times