Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
michael_klix
Creator II
Creator II

getfieldselections () returns the SEARCH of a Listbox instead of the resulting selections.

If you do a search in a listbox  e.g. 1* , which returns all values that start with '1' ,

getfieldselections(FIELD , ','  , 20000)

will return '1*' and not the selected values of FIELD, even if the number of selection is below the parameter 20000. 

If you do the same selection via a visualization object like a barchart with the dimension

aggr(left(FIELD,1),FIELD)

and the measure

count(distinct FIELD) ,

getfieldselections(FIELD , ','  , 20000) will return a proper comma separated list.

 

How can we see the selection as a list, if the selection is made via a placeholder search?

 

Labels (1)
3 Replies
GaryGiles
Specialist
Specialist

Try using the concat() function like this:

if(getselectedcount([Field])>0,concat(distinct [Field],','))

 

michael_klix
Creator II
Creator II
Author

Works great 😊
Is there any limitations on length? The string might get easily 500.000 characters.
GaryGiles
Specialist
Specialist

I'm not sure of the max length limitation.  How do you plan to use/display the results?

You can use the count function to control what happens if a large number of values would be returned.