Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Qlikview script line error

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.

15 Replies

Re: Qlikview script line 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.

balrajahlawat
Esteemed Contributor

Re: Qlikview script line error

Not applicable

Re: Qlikview script line error

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.

Re: Qlikview script line error

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

Re: Qlikview script line error

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

Not applicable

Re: Qlikview script line error

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.

Re: Qlikview script line error

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

Re: Qlikview script line error

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

Re: Qlikview script line error

v_variable contain a source:

is like this:

..\Datasource\sourcefile.qvd

it doesn't have quotes inside.

Community Browser