Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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