Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Conditional show/hide sheets on multi selection

Hi,

is it in anyway possible to show/hide sheets when the user selects more than 1 value?

Currently I have a main category in a list box of which only 1 value at a time can be selected.

However now I'd like to add subcategories based on the selected main category, allowing the user to select more than one subcategory at a time.

category 1

     subcategory1     -> shows sheet 1

     subcategory2     -> shows sheet 2

     subcategory3     -> shows sheet 3

category2

     subcategory1     -> shows sheet 4

     subcategory2     -> shows sheet 5

...

This works perfectly, when the user selects a main category and only 1 subcategory.

But since there can be more than one subcategory selected at a time, the conditional show for the sheet won't work any longer as soon as 2 or more subcategories are selected.

Has anyone got any idea on this?

Cheers,

Erwin.

1 Solution

Accepted Solutions
Partner
Partner

Re: Conditional show/hide sheets on multi selection

I guess your show condition includes something like:

Category2='Subcategory1'

Instead, try using Index():

Index(Category2,'Subcategory1')

Hope this helps,

Jason

View solution in original post

4 Replies
Partner
Partner

Re: Conditional show/hide sheets on multi selection

I guess your show condition includes something like:

Category2='Subcategory1'

Instead, try using Index():

Index(Category2,'Subcategory1')

Hope this helps,

Jason

View solution in original post

jsn
Honored Contributor

Re: Conditional show/hide sheets on multi selection

Hm, for Sheet1 you could use something like:

if(index(concat(subcategoryfield,','), 'subcategory1')>0,1,0)

Basically concatenating the values in your subcategoryfield and checking if the subcategory1 value is part of the concatenated list.

jsn
Honored Contributor

Re: Conditional show/hide sheets on multi selection

Looks like Jason beat me to it

Not applicable

Re: Conditional show/hide sheets on multi selection

Thanks for the help, this works perfectly!