Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Incemental Load difficulties

Dear all,

I am trying to perform an incremental load where Qlikview needs to check whether the next Excel data sheet should be loaded or not.

The first part of the filename (YYYYMM) should be compared with vIncrementalExpression, which will be 0 if the qvd doens't exist or the max YYYYMM.
Problem is that Qlikview skips this comparison. So in the script stated below, it has vIncrementalExpression = 0, vFileBaseName = 201301 but does not compare the two and directly goes to the next file without performing te CALLs.

Does someone know why the if statement is skipped?

For each vFileName in FileList('C:\Users\Data\QVData\Factuurgegevens\*.xlsx')

  LET vFileBaseName = SubField(Subfield('$(vFileName)', '\', -1), 'Factuurregels', 1);

  IF $(vFileBaseName) > $(vIncrementalExpression) THEN

  CALL Laden_Output1;

  CALL Laden_Output2;


  NEXT vFileName

Tags (1)
4 Replies

Re: Incemental Load difficulties

maybe some quotes

  IF '$(vFileBaseName)' > '$(vIncrementalExpression)' THEN

Not applicable

Re: Incemental Load difficulties


I tried, but unfortunately that doesn't do the trick.

Not applicable

Re: Incemental Load difficulties

Hi Inka,

I got the same problem too. Do you finally get the solution?




Re: Incemental Load difficulties


Actually, you don't need expansions in these expressions, so

IF vFileBaseName > vIncrementalExpression THEN ....

should work. If it doesn't check that the two variables have the value expected. You can single step throught the script on the debugger, or add TRACE statements to your script. These will print in the reload progress screen and the in the document log.

TRACE vFileBaseName = $(vFileBaseName);

TRACE vIncrementalExpression  = $(vIncrementalExpression );



Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser