Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use GetFieldSelections() with Alternate State

Hello all,

I have two similar graphs with different filters in different alternate states.

What i want to do is :

When i check the box "Detail"

- Graph1 hiden, Graph2 appears

When i don't check the box "Detail"

- Graph1 apprears, Graph2 hiden.

The box "Detail" is an object list box with one filed.  Since the 2 graphs are not in the same alternate states.  i am not sure how to do it.

Any idea for this?

Thanks in advance!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Assume the Detail listbox is in the default state. To count selections for the field "Detail" in the default state:

GetSelectedCount(Year, true(), '$')

So a conditional show expression might be like to

GetSelectedCount(Detail, true(), '$') > 0   // Something selected

GetSelectedCount(Detail, true(), '$') = 0  // Nothing selected.


It doesn't matter what State the chart is in.  If you want to test a state other than the Default, substitute the state name in for $.


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Assume the Detail listbox is in the default state. To count selections for the field "Detail" in the default state:

GetSelectedCount(Year, true(), '$')

So a conditional show expression might be like to

GetSelectedCount(Detail, true(), '$') > 0   // Something selected

GetSelectedCount(Detail, true(), '$') = 0  // Nothing selected.


It doesn't matter what State the chart is in.  If you want to test a state other than the Default, substitute the state name in for $.


-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Anonymous
Not applicable
Author

Thanks for your help Rob!