Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sangland2
Contributor

Conditional reloads

HI, I have a model that reloads regularly from QMC. The reload should only run if a file exists otherwise exit. The Exit Script function will stop execution and save the model at this point without data or partially completed which is no good. I can save data in qvd's and reload these rather than exiting but the qvd's can be large. I can use a batch file to reload where the batch file checks if the file exists, but I also want to move the files if successfully loaded which is done inside the load script.

Don't want to use EDX.

A workaround is make the load script error if no file is found and put up with the error notifications from QMC but pretty ugly.

Is there any way to just exit a reload gracefully without loading any data and without changing the model ?

3 Replies
ronalddoes
Contributor III

Re: Conditional reloads

Hi Simon,

You could have your script store into a QVD.

  • if the source files are there, load them, move them and overwrite the QVD
  • if the source files are NOT there, exit script

This should keep your QMC task status overview free of ugly exclamation marks, while still relatively simply providing you with an easy to maintain answer to your demands.

Hope it helps you.

With kind regards,

Ronald

ronalddoes
Contributor III

Re: Conditional reloads

Obviously, your dashboard should be reloaded from this QVD. Have QMC reload this on succesful completion of the previous (QVD generation) task.

sangland2
Contributor

Re: Conditional reloads

‌Thanks Ronald. I am using binary and qvd reload of stored data for the fastest reload time when there is nothing new to reload. but it seems there is nothing to just exit Gracefully.

Community Browser