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

display of a text box based on a list box selection

How can I display a text box based on a list box selection?

7 Replies
JonnyPoole
Former Employee
Former Employee

If your List box displays months (ie:   Jan....Dec) then a valid hide/show expression for showing for Jan or Feb would be one of the following:

1. If the user can select only 1 month :

if( only([Month]) = 'Jan' or only([Month])='Feb', 1, 0)

only([Month] -> will check if the user's selection is Jan or Feb.

2.If the user can select multiple months:

if (   substringcount(   concat( distinct  [Month] ,',') , 'Jan') > 0 or  substringcount(   concat( distinct  [Month] ,',') , 'Feb') > 0, 1,0)

--> checks if a delimitted list of values that the user selects contains Jan or Feb

--->  THEN insert the above in the text box properties -> Layout tab - > show -> conditional    area. You can do it for any object, they all have show conditions on the layout tab.

Not applicable
Author

thank you for such prompt reply! genius! My users will be selecting only one option and I am not clear where I need to enter

if( only([Month]) = 'Jan') 

Not applicable
Author

For single value selection in listbox, We can write the below expression in text box properties -> Layout tab - > show -> conditional area

MixMatch(GetFieldSelections([Field Name]),'Value') AND GetSelectedCount([Field Name])=1

JonnyPoole
Former Employee
Former Employee

right here:

Untitled.png

Not applicable
Author

thank you very much

Not applicable
Author

Only function is used to fetch only one value from the field over multiple rows of same value.

Anonymous
Not applicable
Author

Your example worked great for one field selection. What if I want Multiple list boxes to be selected.

[Rule Desc] = '2x per node'

[Fab Node] = Node 1

[To be Node] = Node 2

Thank you,