Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
i need a macro to change the variable value between two values (ex. 0 and 1).
I know that Qlik v11 has this option within the actions of the button.
This setting action fix the variable value as I want but I need to have the macro that make this job.
Thank you in advance!!!!
Its working . am using Qlikview12. Nothing wrong with the VB script
Hi ,
You can change the value dynamically after few seconds,
Try this-
Create variable
=if(second(now())>20,'1',if(second(now())>40,'2','3'))
Try something like in
=if(second(now())>40,'1',if(second(now())>20,'2','3'))
I've seen many Qlikers that propose this solution by time but I need to change on my own by a button or an input box.
Have any other ideas?
If the link i provided to use by macro, doesnt help you, you can aswell,
Create variable vVar,
Create button and add action in it to set variable value as If($(vVar)=1,0,1). It will alter the value every time you click the button
Unfortunately i have Qlik v8 and i can't upgrade it at this moment.
I've already done this action in Qlik v11 as you told me but now i have another Qlik version to manage.
I need have the macro that make this job.
I'm trying this VBScript:
Sub DispName
set Name1 = ActiveDocument.Variables("vName")
GetUserName = Name1.GetContent.String
if ( GetUserName = 0 ) then
tmpString = 1
else
tmpString = 0
end if
Name1.SetContent tmpString , true
End Sub
I want to set vName on 0 if the actual vName value is 1.
Everytime i want to fix the opposite value by button.
I don't know what there is wrong in this code to change the vName value.
Its working . am using Qlikview12. Nothing wrong with the VB script
I've tried in Qlik v11 and it works fine but it doesn't work in Qlik v8 .
I think that is a problem of VBScript of Qlik v8.
Thank you anyway!!!