Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Modify Load statements with variables - syntax displays as error

Hi,

I try to use the same code for a full and a partial reload. Depending on which is executed, I want to add the 'add' keyword to the load statement with a variable:

if IsPartialReload() THEN

       TRACE Executing partial reload;

       Let vPartial = '1';

       Let vAdd = 'add';

else

       TRACE Executing full reload;

       Let vPartial = '0';

       Let vAdd ='';

endif;

....

concatenate (UM)

  $(vAdd) LOAD * INLINE [

     UserName, DeleteDate

     LastUpdate, $(vDate)

  ];

This is working fine, but the script editor marks the whole concatenate stuff as syntax error. Disturbing. Is there a way to bypass this?

Thanks

Jens

2 Replies
MVP & Luminary
MVP & Luminary

Re: Modify Load statements with variables - syntax displays as error

No, it's because the script editor can evaluate the $(vAdd). That only can be done at run time when the script is actually executed. Therefore the script editor can't know if you've unintentionally made an error or intentionally wrote down code that can't be determined to be correct.


talk is cheap, supply exceeds demand
Not applicable

Re: Modify Load statements with variables - syntax displays as error

Thanks, I was afraid that this is the answer. It's not really practical to have half the script highlighted as error.