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

set varible from module

Hi ,

I want to know how set variable when click button via module....

please help me,

3 Replies
Not applicable
Author

Hi sahartaheri ,

why you want via module. there are built in actions in clik view. follow the below steps..

step1: right click on button object and goto ACTIONS tab and clik on ADD button, noe select ACTION TYPE as external and select Action as Set Variable, clik OK button.

Step2: now give the variable name in the Variable Text Box (Example: vName)and give value in the value text box( Example: =10)

Not applicable
Author

Hi,

You can either use Set variable action (as suggested before), or if you insist on creating variable from module, you can use this example (this sub places value 25 into QV variable testVar):

sub Tamto

anyValue = 25

ActiveDocument.CreateVariable("testVar")

set pomVar = ActiveDocument.GetVariable("testVar")

pomVar.SetContent anyValue,true

end sub



Hope this helps:)

Tomas

Not applicable
Author

Hi

thanxxx very very much 🙂