Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All
The include variable is located behind the exit clause.
This script is not interrupted in the exit clause.
Why is the include variable executed?
*********** Script new *****
*************** Script end
Qlik Sense Version : Nov 2023 patch 7
Best Regard
Hanna.choi
Hi Hanna,
if you already reload the script without "exit script" the variable after exit script will still remain in your application.
If you want to remove the variable you have to do it manually.
Kind regards
Hello @vuan
Thank you for your reply.
Does include syntax mean it runs every time because it's a variable?
Are the variables executed unconditionally regardless of the exit clause?
Best Regard
Hanna.choi
Hi,
did you get an error like this one
or is your issue that you don't want to have the variable vTargetPath_qvs ?
KR
It's a behaviour which exists already in quite old QlikView releases and I assume it is there since implementing this feature. I'm not sure if it's really a bug which nobody noticed because the first documented usage was only include and not must_include and it don't happens to include.
I could imagine that if it would be a classical bug that fixing it shouldn't be very expensive - even if the priority for this case isn't very high. Therefore I think it's more an accepted side-effect to the way how the script is parsed and transferred to the engine which may much more sophisticated to solve.
The practically solution is therefore to comment the must_include. Not yet tried but probably possible might be to wrap the must_include within another include or a sub-routine or to build the statement on-the-fly ...
Hi @vuan
I am curious Why the script is not stop at the exit script.
I don't understand why the error is happen at the"must_include" sentence.
"must_include" sentence is located after "exit script" .
Best regard
hanna.choi
Like mentioned I'm not sure how to claim this behaviour. Thinkable would be for example that the exit script; statement is newer as must_include and is therefore during the run-time later evaluated or there were other intended scenarios to give it a higher priority (never checked but it would be a valide use.case), like: closing connections and cleaning the script after a script-error happens or maybe triggering further tasks to avoid any erroneous data or an instable system.