Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
shawnqlikfv
Contributor
Contributor

action condition based on selected value and possible values

Hi,

I have an object and only wants to  display it only if a selected value from selection list matches from a set of values.

i.e

I have 1 chart calls  West Region

I have 1 selection box with field name State

I have 1 table State Values containing the possible values for West Region

The West Region chart action based on below criteria

if I select 'California' or 'Washington'  . from State selection box, the West Region chart will appears(.  If I select 'New York'  the West Region chart remains hidden.  Any help on this is greatly appreciated.

State Values

Washington

Nevada

California

Wyomingobject_trigger.GIF.gif

Message was edited by: shawn nguyen

1 Solution

Accepted Solutions
Not applicable

If Im understanding this correctly, you can use the following statement

=substringcount(concat(distinct [States],','),

GetFieldSelections(Western_States)

)

for the Show property of the table. (See attached).

HTH!

View solution in original post

14 Replies
Gysbert_Wassenaar

On the Layout tab of the properties window of the chart you can enable the option Conditional (under Show) and enter an expression to show the chart only under the right conditions. Something like =substringcount(concat(distinct [State Values],','),'California','Washington'). This expression will see if the string California or the string Washington is in the list of concatenated State Values values.


talk is cheap, supply exceeds demand
Anonymous
Not applicable


in layout tab, type this in for show condition :

getfieldselections(State)='California' or getfieldselections(State)='Washington'

its_anandrjs

If have any sample data then provide might be you can use

GetFieldSelections function for string selection

shawnqlikfv
Contributor
Contributor
Author

Hi,

Not sure if I follow your comment. Please clarify. Thanks.

its_anandrjs

In the chart layout properties write a code like

If( Getfieldselections(State)='California' or Getfieldselections(State)='Washington',1,0)



shawnqlikfv
Contributor
Contributor
Author

I appreciate the response. Instead of hardcoding 'California' or 'Washington', can a matching result process be dynamic from the State Values table ? The conditions are fluid so hardcoding them is not advised.

shawnqlikfv
Contributor
Contributor
Author

I appreciate the response. Instead of hardcoding 'California' or 'Washington', can a matching result process be dynamic from the State Values table ? The conditions are fluid so hardcoding them is not advised.

shawnqlikfv
Contributor
Contributor
Author

I appreciate the response. Instead of hardcoding 'California' or 'Washington', can a matching result process be dynamic from the State Values table ? The conditions are fluid so hardcoding them is not advised.

Anonymous
Not applicable

if there is a particular logic you can try that...but to show/hide based on a particular condition you would need to input that particular condition in the layout tab.

i suggest thath you attach a sample app to get faster and a specific solution.