Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I would like a button to set a variable

I would like a button to set a variable.

See attached example that I can not get to work.

Please help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try using this as expression to set the value:

=if(Variable1=1,2,1)

and this as Text for your button in general tab:

=if(Variable1=1,'Off','On')

View solution in original post

5 Replies
Nicole-Smith

See attached.

swuehl
MVP
MVP

Seems all ok to me, you just need to define the value you want to assign in the action property dialog.

Not applicable
Author

When I switch the button on, I would like it to display 1 in the text box and when I switch it off to display 2

Thanks

swuehl
MVP
MVP

Try using this as expression to set the value:

=if(Variable1=1,2,1)

and this as Text for your button in general tab:

=if(Variable1=1,'Off','On')

Stefan_Walther
Employee
Employee

Hi,

have a look at:

http://www.qlikblog.at/1851/onoffswitch-qlikview-extension/

Maybe this helps!

Regards

Stefan