Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error in calling function

Hi,

I'm just learning how to create SUB and FUNCTION in Qlikview.  I have a function called CreateExcel() which accepts an ObjectID.

If I do a Test within the Edit Module, it creates the Excel with the object id I passed in.  However if I place this call in the Load Script like

call CreateExcel("TB01");

I get this error:

Script line error: call CreateExcel("TB01")

If I used this syntax in load script

LET vRetVal = CreateExcel("TB01");

I didn't get the error but no Excel generated either.

What's the right syntax to call this in load script?

Thanks

12 Replies
Anonymous
Not applicable
Author

swuehl


I checked out the link you provided but I have no success yet.


I am still searching and trying different things

swuehl
MVP
MVP

And which of the two approaches that Rob suggested is not working yet?

If you want to use a variable, it will look like (assuming that you created a variable in variable overview vMacroParameter and set the object ID):

SUB MacroCall

set v = ActiveDocument.GetVariable("vMacroParameter")

msgbox("Parameter Output " & v.GetContent.String)

END SUB

Be warned that there are a lot of limitations using macros in QV, especially when working with the Ajax client.