Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text Between , list box , hide and display of sheet

I am trying to manage hide and display of sheet based on the selection on a list box.

List Box Field Type: (Apple, Ball, Cat)

Sheets : Sheet 1 (Apple), Sheet 2 (Ball) and Sheet 3 (CAT)

I need to unhide both sheets 1 and 2 when a user selects Values Apple and Ball from the list box Type

My approach:

vSelected='|' & GetFieldSelections(Type,'|')&'|' , returns all the values selected in Field Type

if(TextBetween(vSelected,'|','|')='Apple') This is applied as show conditional logic for sheet and where the problem lies.

Can someone please help me.

Thank you.

Pranita

1 Solution

Accepted Solutions
Not applicable
Author

I would use Index() instead of TextBetween. Then you have something like:

Index(GetFieldSelections(Type, '|'), 'Apple') > 0


I'm not sure why you would need the bars before and after the selection list unless some of your values are subsets of others. In that case, you would need:

Index('|' & GetFieldSelections(Type, '|') & '|', '|Apple|') > 0


Either of those should work directly in the Conditional Show box.

View solution in original post

7 Replies
Not applicable
Author

I would use Index() instead of TextBetween. Then you have something like:

Index(GetFieldSelections(Type, '|'), 'Apple') > 0


I'm not sure why you would need the bars before and after the selection list unless some of your values are subsets of others. In that case, you would need:

Index('|' & GetFieldSelections(Type, '|') & '|', '|Apple|') > 0


Either of those should work directly in the Conditional Show box.

johnw
Champion III
Champion III

I think this would work for the conditional show:

index(getfieldselections(Type,'|'),'Apple')

Edit: Beaten to the punch.

Not applicable
Author

Hi Pranita, I would use the following approach better

index(concat(distinct Fruit, '|'),'Apple') and

index(concat(distinct Fruit, '|'),'Ball')

Regards

johnw
Champion III
Champion III

The difference in the two approaches being whether you want the tabs to show if the values are possible, or ONLY if the values are explicitly selected.

Not applicable
Author

Thank you all for your response. In my case below is the desired solution.

Index(GetFieldSelections(Type, ','), 'Apple') > 0

Thank you much !!

Pranita

Not applicable
Author

Hi can I ask exmple file for this? Thanks I really need to know how to hide/show sheet when selecting value in listbox (which is located in the other sheet)

example:

Sheet 1 has listbox, when selecting/click data on the listbox, corresponding information should be displayed/viewable on the new sheet which is sheet 2. Don't know how to do this. Need help. Thanks. ASAP thanks.

-best regards, Bill Ringer

Not applicable
Author

Bill,

Attached is the file.

Take look at sheet properties, Conditional as highlighted below.

Hope this helps

Thank you.

Pranita

sheet image 1.png