Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional Display of Text Box?

Hi folks -

I have a text box that I would like to display if a certain combination of Fields are selected - essentially a warning saying that with the current selections, there is no data to display.  I've made an image to use for this purpose and so right now it's just a text box with the image as a background.

How to I make this text box show up conditionally, and disappear if the conditions aren't met (if the user hits back and/or clears selections)?

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

in layout tab, select conditional and use an expression, something like below. this example has almost all possible combinations of field values so modify to your needs.


the text box will show only if all the values are selected for the fields you specify, otherwise, it won't.


=if(GetFieldSelections(State)='(TX|MI)' and GetFieldSelections([FIPS County])='(12012|10000)' and GetFieldSelections(Region)='("Central North"|East)',1,0)

if you need just the field combinations, i would use the following expression in the conditional show:

getselectedcount(/*FieldName1*/)>0 and getselectedcount(/*FieldName2*/)>0

View solution in original post

6 Replies
ThornOfCrowns
Specialist II
Specialist II

Doesn't the chart automatically give you the "No Data To Display" error message?

Anonymous
Not applicable
Author

in layout tab, select conditional and use an expression, something like below. this example has almost all possible combinations of field values so modify to your needs.


the text box will show only if all the values are selected for the fields you specify, otherwise, it won't.


=if(GetFieldSelections(State)='(TX|MI)' and GetFieldSelections([FIPS County])='(12012|10000)' and GetFieldSelections(Region)='("Central North"|East)',1,0)

if you need just the field combinations, i would use the following expression in the conditional show:

getselectedcount(/*FieldName1*/)>0 and getselectedcount(/*FieldName2*/)>0

alexandros17
Partner - Champion III
Partner - Champion III

In the text object go in the "layout" tab, then in the "show" section select "conditional" and write:

=GetSelectedCount(myField) > 0

with this instruction you display the text box only if there is at least a selection in the specified field. (if you have more than one field to test add conditions with and

e.g: =GetSelectedCount(myField1) > 0  and GetSelectedCount(myField2) > 0

Anonymous
Not applicable
Author

Hi,

Try something like this:

In the Text box properties ,Under Layout Tab:

For show option, Select conditional and write and expression similar to this:

=if(GetFieldSelections(Field1)= 'P' and getFieldSelections(Field2) = 'A',1,0)

ashfaq_haseeb
Champion III
Champion III

Hi,

Look at the below post.

http://www.quickintelligence.co.uk/qlikview-buttons/

Regards

ASHFAQ

Not applicable
Author

Well, yes, if there we actually no data to display.  The problem for us is that there's a point in which our two datasets cease to match up and we have to let the user know that.  We've opted to say that there is no data to display.