Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

On off button

Hi!

Can somebody help me how to program an On/Off button, that controlls a varialbe if it is on or off (0 or 1)?

best regards,

Attila

3 Replies
Miguel_Angel_Baeyens

Hello Attila,

Hope this piece of code will do

Sub OnOff set var = ActiveDocument.Variables("vIsOnOff") set vButtonLabel = ActiveDocument.Variables("vButtonName") val = var.GetContent.String if val = 0 then vButtonLabel.SetContent "Switch Off", true var.SetContent 1, true else vButtonLabel.SetContent "Switch On", true var.SetContent 0, true end ifEnd Sub


Regards.

Anonymous
Not applicable
Author

Hello,

I think that the following post contains the informations you need :

button on/off by clik

isingh30
Specialist
Specialist

Please check this. Let me know.

Thanks.