Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
recently i faced a problem with usage of must_include mixed after an exit scrit.
Create a simple app with one connector (i've called it TEST) pointing where you want with one qvs file inside
step1.qvs with code :
//First step loaded
Trace --->> Hello World ! <<---;
In your qlik sense app, add a section after Main with following code :
/*
First Must_Include
*/
$(Must_Include=lib://TEST/step1.qvs);
Exit Script;
/*
Second Must_Include that musn't be loaded :
- file dosen't exist
- there is an Exist Script before !!!
*/
$(Must_Include=lib://TEST/step2.qvs);
Save your app and relaod... tadaaaa
reload fails... 😞
So, when you have an Exit Script; in your code, take care of not calling a Must_Include function after it because it can fails reload 😉 (if this must_include isn't working)
Have a nice day, Ben
The exit script stops EXECUTION, but it does not stop PARSING. So you can have syntax errors and the includes will continue be loaded (as the include expansions are part of the parse process). I think that $(include...) and $(must_incude...) will behave similarly in this regard. Although if the file is missing, the straight include will fail silently, while the must_include generates an error message.
The exit script stops EXECUTION, but it does not stop PARSING. So you can have syntax errors and the includes will continue be loaded (as the include expansions are part of the parse process). I think that $(include...) and $(must_incude...) will behave similarly in this regard. Although if the file is missing, the straight include will fail silently, while the must_include generates an error message.
I was thinking that an Exit Script should stop parsing the code...that's not the case totally agree
Is there another option to avoid this kind of problem ? (/ex an app with old code archived in a section in app after the exit script; )
Same problem logged here : https://community.qlik.com/t5/Ideas/Make-quot-exit-script-quot-exiting-script-For-real/idi-p/1666654