Qlik Community

Ask a Question

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview script line error

hi All,

i am coding in Qlikview 11 and i have written and i received  a "Script line error" just after a CALL like this


     CALL my_proc('param_1','param_2')

i have no idea why, someone have some suggestion?

thanks a lot.

1 Solution

Accepted Solutions

I'll answer my own question: Probably not.

The following code executes perfectly:

SUB my_proc(vParm1)

  SET vFlag = ProcDef1;


SUB my_proc(vParm1001)

  SET vFlag = ProcDef2;


CALL My_Proc('val1');

And variable vFlag will contain 'ProcDef2', meaning that the last definition is being executed. It's not just the fact that you defined your SUB twice that causes this error.

View solution in original post

15 Replies

Is subroutine my_proc defined before the CALL statement? QlikView does not perform a lookahead, or a preparsing step. The subroutine should already exist before you can make use of it.

Not applicable

yes, i have declare before calling, the strange things is that i have different part in my script that has the same structure and all other part work well; is only this part that as this problem.

Check the number of parameters. Does my_proc really expect two parameters?


what is the definition of subroutine? what actually subroutine does?

Not applicable

this is the call

  • CALL My_Proc('$(v_variable)','out_one.qvd','out_two.qvd','done','[Field_one],[Field_two]')

this is the declaration

  • sub My_Proc(p_source,p_out_oneN,p_out_twoN,p_typeN,p_fields)

as type of calling is the same of other (i mean that i have other routine that work the same as this with the same parameters) but this is the only that give me problem the others give me correct output.

So what's in v_variable at the time of the CALL? I hope it doesn't contain any strings with quotes.

If you want to be sure what exacly the CALL statement-with-parameters looks like at the time of execution, generate a document log and search for the Script line error message in that log. The $-sign expanded CALL statement will precede the error message.

Not applicable

v_variable contain a source:

is like this:


it doesn't have quotes inside.