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: 
Not applicable

How do i get new button by pressing Button

Dear All,

If i click the Button it should bring the new button in the Same Sheet, Again if i click the Button then the new button should be hide.

Can any one help me.

Regards,

Antony

1 Solution

Accepted Solutions
Not applicable
Author

hi,

take two buttons button1 and button2. Take a variable vButton from

settings-> variable overview

and put 0 into the variable.

now goto properties of Button1 and add an action: set variable

give the variable name vButton in the variablename text box and write the below condicion in the value text box.

=if(vButton=0,1,0)

now goto properties of Button2 and goto layout tab and select the condicional radio button and writethe below expression into the beside textbox.

=vButton

i think it works perfectly, if u do all the above things..

regards

A'run'

View solution in original post

6 Replies
Not applicable
Author

hi,

take two buttons button1 and button2. Take a variable vButton from

settings-> variable overview

and put 0 into the variable.

now goto properties of Button1 and add an action: set variable

give the variable name vButton in the variablename text box and write the below condicion in the value text box.

=if(vButton=0,1,0)

now goto properties of Button2 and goto layout tab and select the condicional radio button and writethe below expression into the beside textbox.

=vButton

i think it works perfectly, if u do all the above things..

regards

A'run'

Not applicable
Author

1. Create a variable (Ctrl+Alt+V), such as vShowButton, with default value of 1.

2. Create one button where the conditional show (Layout tab) is vShowButton =1 and attach all your actions, plus one last one that is associated to a variable setting, i.e. Set Variable, Variable name is vShowButton and Value = 2.

3. Create another button where the conditional show (Layout tab) is vShowButton =2 and attach all your actions, plus one last one that is associated to a variable setting, i.e. Set Variable, Variable name is vShowButton and Value = 1.

Should work. See attached QVW.

Miguel_Angel_Baeyens

Hello Antony,

Create one variable to control visibility of second button, say vVisible, and create another variable that stores the text of the button say vButtonText. You can do this in the Settings menu, Variable Overview.

Now create a new sheet object, button. Set its text to

=vButtonText


That now is empty, so it will show "-". In the button properties, Actions, create a new action, External, Set Variable, Variable is vVisible and value is

=If(vVisible = 1, 0, 1)


Add a new action, Set Variable, Variable vButtonText, and value is

=If(vButtonVisible = 1, 'Show Button', 'Hide Button')


Now create the second button, right click on it, go to Properties, Layout, Show, Conditional, and write

vVisible = 1


And you're done. Check that you click on the first button, and it shows the text "Show Button" or "Hide Button" according to the visibility of the new button.

No need for macros in this action, cleaner.

Hope this helps.

Not applicable
Author

Dear Antony,

PFA

Not applicable
Author

Hi Arun,

Thanks i got the answer. Instead of if condition , i used "Not($(vButton))" in 1st Button.

Thanks for your Help.

Regards,

Napolean.

Not applicable
Author

Thanks , its working.