Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
taylor_jesse
Creator
Creator

Layout Condition Expressions

Hello

I have a text box as a header that displays the header on top of a straight table based on what the user selects.

For instance if the user selects a Team, the team name will appear.

I am trying to do the same thing for when a user selects a region as well as a group.

It works for when a user selects a region however when select a group, the two text boxes overlap.

Below are the expression for each text box

Expression for text box for Team header

=if(isnull(LocationDescription and Location_LocationCode),LocationDescription_LocationCode&' ' & group,' ')

Conditional expression to display the text box

=GetSelectedCount(TeamFilter)>0

Expression for text box for Region header

=region_name

Conditional expression to display the text box

=GetSelectedCount(region_name)>0 and (LocationDescription_LocationCode)<1

Expression for text box for group header

=group_name

Conditional expression to display the text box

=GetSelectedCount(group_name)>0

Attached is also how it looks when multiple is selected.

4 Replies
jcampbell474
Creator III
Creator III

Are you trying to show the region and group at the same time?  If so, you shouldn't need two conditional expressions.

You can try something like: =if(GetSelectedCount(region_name) + GetSelectedCount(group_name) = 2,region_name&' '&group_name)

HTH,

Jason

taylor_jesse
Creator
Creator
Author

I am trying to show only region when the user selects region and only group when the user selects group however for some reason it overlaps each other. I have different text boxes for each that should trigger based on the user selection.

jcampbell474
Creator III
Creator III

You'll need to add an Action in the Button Trigger to clear the region field or group field, depending on which one is selected. 

In the Region button, select the Actions tab > Add > Selection  > Clear Field > group field.

In the group button, select the Actions tab > Add > Selection  > Clear Field > region field.


Does this help?

taylor_jesse
Creator
Creator
Author

Hi,

I do not have buttons created. I was looking to include a conditional expression under the layout tag. For instance

an expression that will disregard any selection made for a region if a group is being selected first. I was thinking about a set analysis in the getselectedcount expression.

Thank