Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
weiw
Contributor II
Contributor II

Field selected in current selection

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.

Labels (1)
2 Replies
Mark_Leifeld
Partner - Creator
Partner - Creator

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.

Or
MVP
MVP

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.