Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to display all the fields selected in current selection but excludes the field name.
The getcurrentselection() can display all selection details but i want to only show the field excluding the field names in that function. Can anyone help me on that? Thank you.
Hi,
you can use GetFieldSelections(). https://help.qlik.com/en-US/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/ChartFunctions/Fi...
GetFieldSelections() only returns a string with the current selections in a field.
The disadvantage here is that you have to do this for each field individually.
You could use string functions to pull out just the fields to a certain extent... but that would be very tricky to do given there's quite a few options on how the text might parse out depending on if you have certain characters in your field names (whitespace, comma, colon, etc) and the possibility of NOT X type selections.
More realistically, you'd want to loop through all the fields and use GetFieldSelections() on each, keeping only the ones that return a non-null value. You could probably achieve this using chart-level scripting, but I'm not sure if there's a reasonable way of doing it elsewhere. Maybe something using ValueLoop() and a pre-loaded table that assigns a number to each field? Not sure.