Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional view GetSelectedCount

Dear amazing Qlik community,


I have a question which, after a lot of tries, I'm not really able to solve.

My goal: I would like to create a conditional view for a listbox after a selection in another listbox has been made.

I'm very familiar with the function GetSelectedCount.

For example, I have 2 listboxes:

Listbox 1 with company names, (Company A, Company  B and Company C)

Listbox 2 with employee names.

I know that with GetSelectedCount, I can create a conditional view for the listbox with employee names. So that this listbox will show up when I make a selection in my first listbox.

My question is: is it also possible to create a conditional view that my second listbox will only show up when I select Company A in listbox 1? In this case, the second listbox will not show up when I select Company B or Company C.

Does such kind of conditional view exist?

Thank you very much in advance for your help!

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

May be as below:
=if(GetFieldSelections([Company Name])='Company A',[Company Name])

View solution in original post

4 Replies
sunny_talwar

May be like this:

For only when Company A is selected

If([company names] = 'Company A')

or

For when more than one companies are selected and Company A is one of them. Should also cover when only Company A is selected

If(SubStringCount('|' & GetFieldSelections([company names], '|,|') & '|', '|Company A|') = 1

trdandamudi
Master II
Master II

May be as below:
=if(GetFieldSelections([Company Name])='Company A',[Company Name])

Not applicable
Author

Hi Thirumala and Sunny,

Thank you very much for your super quick help and replies!

I was able to solve it with your help but it was even easier than you have suggested.


-->> GetFieldSelections([Company Name])='Company A'


that was enough for the conditional view to get it working.

So pretty easy after all, but your help and making me aware of the GetFieldSelections function was absolutely perfect!


Thanks and have a nice day!


sunny_talwar

I think that you got your solution, but why complicate your expression when you can just use this (unless you like more complicated expressions )?

[company names] = 'Company A'