Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to execute a subroutine from a Button Action? I want to call a subroutine which receives a variable as an argument. (The subroutine manipulates the argument and assigns a value to another variable.)
Hi Hanief,
There's no possibility to call a subroutine from load script into a button, you can only do that with macros in View and than use the macro into the button.
I've made a simple example of macro bellow, that gets the variable vTest and add one to it and puts the result to vTestFinal.
function getVariable
set v = ActiveDocument.GetVariable("vTest")
set vFinal = ActiveDocument.GetVariable("vTestFinal")
msgbox(v.GetContent.String)
vNum = CInt(v.GetContent.String)
vNum = vNum+1 ' do calculations here
msgbox(vNum)
vFinal.SetContent vNum,true
end function
Also attached a sample QVW
Thank you. This resolved my issue
Is there any way to macro using Qlikview script statements? Otherwise I have to convert the code to vbscript