Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NewToQV
Contributor III
Contributor III

Show/Hide Text Object Automatically

Good morning,

I have setup some variables in my QV document in addition to two buttons and text objects.

LET vShow1=1;
LET vShow2=1;

My buttons also change their text conditionally 

=If(vShow1=0,'Show', 'Hide') & ' First Table'

=If(vShow2=0,'Show', 'Hide') & ' Second Table'

My two text objects (which contain images) are shown conditionally by vShow1=1 and vShow2=1.

 

Now when I click each button the image shows and hides accordingly just as designed and the button text changes from Show First Table, to Hide First Table etc. depending on whether or not it is showing or not. 

However is it possible to automatically hide 'vShow1' if vShow2 is shown? vice versa? Further explained. if the "First Table" is showing, and I click the second button, the following would occur. The button text should now say 'Show First Table' and the First Table text image object would hide, and the second image would unhide, and the text in the second button object would change to "Hide Second Table". 

Thank you in advance. I'm very new to QV and any help or suggestions would be great. 

 

1 Solution

Accepted Solutions
NewToQV
Contributor III
Contributor III
Author

I've been able to achieve autohiding multiple objects by creating a variable. In this case 'vShowTable'.

I then created my buttons and assigned a 'Set Variable' action and used my 'vShowTable' for the action variable and then chose the Value I wanted to assign. 

Then in my text object images, I chose to conditionally show vShowTable='Assigned Value'.

This way, only one variable was needed. Any button I click will automatically show the text object images associated with that value. If I click another button with another value, the text objects automatically hide that aren't associated with it, and the new text objects are shown. Thanks everyone. 

View solution in original post

3 Replies
anushree1
Specialist II
Specialist II

please check the attached

gerhardvanwyk
Contributor II
Contributor II

In properties under layout Show conditional. add appropriate variables. i.e vShow1 = 0

NewToQV
Contributor III
Contributor III
Author

I've been able to achieve autohiding multiple objects by creating a variable. In this case 'vShowTable'.

I then created my buttons and assigned a 'Set Variable' action and used my 'vShowTable' for the action variable and then chose the Value I wanted to assign. 

Then in my text object images, I chose to conditionally show vShowTable='Assigned Value'.

This way, only one variable was needed. Any button I click will automatically show the text object images associated with that value. If I click another button with another value, the text objects automatically hide that aren't associated with it, and the new text objects are shown. Thanks everyone.