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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

GetFieldSelections help

Hi,

I'm trying to create an expression which shows all the Fruit's selected from the listbox BUT it doesn't list them correctly when I select more than 6. - see attached.(textbox)

Basically, I want to be able to use this selection of 'Fruits' in a Set-Analysis expression, so it will also need a square bracket added to each fruit too.

For example :

AVG({$<Fruit={[Apple],[Pear],[Banana]  }>}Value)

Any ideas/tips on how I can get all the selected fruits, with a square bracket done in an expression?

Much appreciated!

3 Replies
Not applicable
Author

='[' &Concat(Fruit,',') & ']'

UPDATE

in case you need every value in brackets:

=Concat( '[' &Fruit  & ']' , ',')

Not applicable
Author

HI,

You can print all selected fruits by passing parameters to the function GetFieldSelections()

It takes 3 parameters:

1. field name

2. Value Seperater

3. max number values to be display.

try this:

='[' & GetFieldSelections(Fruit,',',10) & ']'

Hope this will help you.

Niranjan M

Not applicable
Author

Thanks for your help. I used both of your solutions : =Concat( '[' &Institution  & ']' , ',')