Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
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

Labels (1)
12 Replies
swuehl
Champion III
Champion III

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
Champion III
Champion III

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.