The beauty of script autocompletion in Qlik Sense
Such a simple thing – but oh how useful.
One of the recent versions (3.0? 3.1? 3.1.1?) of Sense added much improved syntax color coding of the load scripts, as well as autocompletion of function names, field names, variables etc.
What might seem like a small change is at least to me super, super useful. I can suddenly keep my hands on the keyboard, and don’t have to switch to another browser tab to check in the app data model to check the exact name of some field – I just type a couple of characters and a list of suggestions pop up. Productivity is up and frustration down – that is a very good combo.
A nice side effect of the increased productivity is that I have learned several new features of the Sense (and QlikView) scripting language. I have for example for years used an if statement together with exist script during (mainly) debugging, to abort script execution when a variable (like a for loop counter) reach some value. I.e. I only want to run the loop 5 times during debugging, versus the normal 1000 times during production reloads.
Autocompletion wonders
The autocompletion feature then showed me that “exit script” can be used in several different ways – see screenshot to the right.
Once again – it might seem like a small change, but being able to write
Exit Script when vIter=5;
is a really clean and compact way of getting the job done. One line of code instead of three, and better looking.
Over to you guys – what’s your favourite load script trick?