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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

dynamic input box

i would like to display the distinct values of a specific field in an input box.

how do i declare the variable?

Thanks,

Lambert.

6 Replies
Not applicable
Author

Do you want all values, selected values, possible values?

For all set a variable to:

=Concat({1} FIELD)


For selected:

=GetFieldSelections(FIELD)


Possible should just be:

=Concat(FIELD)


Not applicable
Author

i would like all distinct values in a dropdown list input box.

Not applicable
Author

Sorry, I saw variables and kind of missed the input box part. It doesn't seem like a variable works on a pre-defined list in an input box. The format is 'Val';'Val2';Val3'.

To get that in a variable it would be:

=Chr(39) & Concat({1} distinct FIELD, Chr(39) & ';' & Chr(39)) & Chr(39)


Unfortunately when that is used as the PreDefined list in an input box, it doesn't seem to work. Even though manually entering the same result would. I tried a few different things, like directly entering the expression and using a variable as =vVar, $(=vVar), $(vVar), etc. I don't use Input Boxes very often, so I'm not sure if that is possible. If it is, the above expression should work to get the values set up correctly.

EDIT: Numbers seem to work just fine, but don't require the quotes. For a numeric field:

Concat({1} distinct FIELD, ',')
That should show all values for the field and work as the Pre Defined list.

Not applicable
Author

Thanks for the reply, i will see what I can figure out.

Not applicable
Author

yeah, that worked, thanks a million!

Not applicable
Author

Thanks,

this works for me as well.

K.