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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List box question

hello,

i have created a list box from expression (can use only object id),

now i need to write a macro that peek all selected value from list box.

how can i do that?

thanks,

avi

Labels (1)
1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Use this expression below and assign it to a variable

=CONCAT(AGGR(Sum(COUNTER), F1), ';')

where

- AGGR(Sum(COUNTER), F1) - Expression used in listbox

- COUNTER and F1 are columns

now you will have the selected values in the list box separated by '";"

Now you can get the value in the variable in macro.

Hope this helps you.

Regards,

Jagan.

View solution in original post

4 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

You can get selected field values by using the function

Ex: GetFieldSelections ( Year, '; '  )  - Returns the selected values of years separated by ;

Is there any specific reason to write macro?  If need assign the function to a variable, and get the variable value in macro.

Regards,

Jagan.

Not applicable
Author

hi,

the only problem is that is have used an expression and not a field in the list box,

and as i know GetFieldSelections  get a field.

avi

jagan
Partner - Champion III
Partner - Champion III

Hi,

Use this expression below and assign it to a variable

=CONCAT(AGGR(Sum(COUNTER), F1), ';')

where

- AGGR(Sum(COUNTER), F1) - Expression used in listbox

- COUNTER and F1 are columns

now you will have the selected values in the list box separated by '";"

Now you can get the value in the variable in macro.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

thank you!!!