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

Layout condition With Alternate States

Hey all

I Have a Text box and two list boxes A in State1 and B in State2.

Now i need to apply condition to textbox to show when we select both the listboxes A and B.

Can i use GetSelectedCount() or GetAlternativeCount()?/

-Walter

1 Solution

Accepted Solutions
sunny_talwar

Try this if the text box should be visible when both are selected:

GetSelectedCount(Dim1, 0, 'AS') > 0 and GetSelectedCount(Dim1, 0, 'AS2') > 0

If it should be visible when even one of them are selected:

GetSelectedCount(Dim1, 0, 'AS') > 0 or GetSelectedCount(Dim1, 0, 'AS2') > 0

View solution in original post

9 Replies
sunny_talwar

Sure you can. You can specify state_name as your third parameter:

Capture.PNG

Not applicable
Author

Thanks for the reply Sunny.

I figured it out,But its not allowing me to apply Alternate states in there.

Can you explain with example:

Thanks and appreciate it

sunny_talwar

Check this out:

Capture.PNG

Not applicable
Author

Hey Sunny. Sorry for the confusion.

But I want that condition to be applied in Show condition. like below.

If we select in ListBox A and ListBox B then the text box should be visible and if nothing is selected then Textbox should be hidden.

Capture.PNG

Thanks for your time.

sunny_talwar

Try this if the text box should be visible when both are selected:

GetSelectedCount(Dim1, 0, 'AS') > 0 and GetSelectedCount(Dim1, 0, 'AS2') > 0

If it should be visible when even one of them are selected:

GetSelectedCount(Dim1, 0, 'AS') > 0 or GetSelectedCount(Dim1, 0, 'AS2') > 0

Not applicable
Author

Thanks a ton buddy.

Thanks for your time.

sunny_talwar

No problem, I am glad I was able to help

Not applicable
Author

Hi Sunny, I ran into another issue here ....

I have another Text Object where it should be enabled when either of Dim2 list box is selected then Text object ABCD should be visible and Text object 1234 should be disabled.

sunny_talwar

See if the attached works for you.