Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Text Value When Listbox Has Nothing Selected

Hi all,

I'm trying to build up a title dynamically and have the following code to generate the values from my 'Attempt' list box.
This is working, however when nothing is selected at all, I'd like the text to default to 'ALL'.

Is there any way to do this?

Current code I'm using in the textbox expression is below.
Thanks

GetFieldSelections(Attempt)

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Like:

If(GetSelectedCount(Attempt)=0, 'All', GetCurrentSelection(Attempt))

View solution in original post

5 Replies
sasikanth
Master
Master

try like below

if(getSelectedCount(attempt)>0,getFieldSelections(attempt),'ALL')

tresesco
MVP
MVP

Like:

If(GetSelectedCount(Attempt)=0, 'All', GetCurrentSelection(Attempt))

Not applicable
Author

Thanks but now it just seems to stay as 'ALL'. When I do make a selection the values don't show. It just stays as 'ALL'

Any ideas?

Not applicable
Author

This worked. Thanks very much!

sasikanth
Master
Master

if you select any thing in Attempt then that will be shown else 'ALL'  will be shown ,

what you are getting and what you want exactly