Recently I blogged on Include Files in QlikView, and mentioned the fact that QlikView doesn’t advise you when an include file was missing. This led to a discussion on QlikCommunity and a revelation to me of a new feature. This feature is not documented in the QlikView help files and Google turned up just one result for it.
The function itself is not revolutionary, but it is going to cause me to have to go back and modify many QlikView apps to use it. As I described in my previous blog, you can include code from an external script file simply by referencing it like this:
This is all well and good, provided that ExternalScript.qvs exists. However, if you have a typo in your file name then QlikView will happily just ignore your include statement and get on with the load script. That is until it references that table you thought you loaded in your include file. Debugging this could take some time – as the error will not necessarily occur anywhere near where you include failed and unless you are aware that QlikView doesn’t raise errors on missing includes you may not suspect that is the fault anyway.
This seemed to me like a bit of a flaw in how QlikView handles includes.
However, someone has obviously noticed this at QlikTech and with just a small change to your code:
You will get an error message raised on any missing scripts. This will alert you in Desktop mode, or send abort your load and send a notification in batch mode. To my mind a much more useful thing to do than to keep the missing file quiet.
There have been other occasions where there is a seemingly un-documented feature in QlikView that really helps makes things better, the AllowDataLineage flag being a recent case in point. I’m sure there are many more of these that I am yet to uncover.
If you are able to tip me off to any more of these, please leave a comment below.