Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
I'll answer my own question: Probably not.
The following code executes perfectly:
SUB my_proc(vParm1)
SET vFlag = ProcDef1;
END SUB
SUB my_proc(vParm1001)
SET vFlag = ProcDef2;
END SUB
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.
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.
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?
this is the call
this is the declaration
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.
v_variable contain a source:
is like this:
..\Datasource\sourcefile.qvd
it doesn't have quotes inside.