Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there!
I am facing an issue that I cannot find in the Qlik Help, here in the Community or anywhere else. It is perhaps too simple or impossible.
Years ago, it was possible to include a sentence with the path to a TXT file containing Qlik syntax and the Load Editor parsed it as part of the whole load script. This was very useful when defining -for instance- colours so every app could make such a call to the TXT file and this was an excellent way to ensure consistency in colours. Or a good way to re-use scripts.
However, I was using first Qlik Sense Desktop and then Qlik Server, both allowed me to address/upload files to a folder and then the Data Connection added the path to the file and I could access those scripts via an $(Include) statement.
I do not have any issues with the $(Include=...) syntax... the problem is how to upload a TXT file to Qlik Cloud. I was not able, so I created a script within Qlik Cloud as follows:
This script has nothing else, it's just that. saved in Colours.txt.
I can see it in the Qlik Cloud Analytics - Home section as a script:
And in my app's load script, I am using this:
$(include=[lib://TESS:DataFiles/Colours.qvs]);
When I use
There is no error message, but it does not load the colours...
Questions:
1) Is it possible to upload a TXT file?
2) If so, how?
3) If not, how do I properly link the QVS file? Nothing seems to work and no error messages are more cryptical for the solution to be found...
Thank you!
Nevermind!
Found myself a way...
In the app, I clicked this icon:
The I dragged and dropped the file... and voilà!
Now, I used this:
$(include=[lib://TESS:DataFiles/Colours.txt]);
It worked!
When checking my load script, there is a tiny icon beside the $(include=...) sentence that pops up this:
So, it's there 😉
You write that the file is named Colours.txt and then include Colours.qvs ?
Switch to must_include to get an error if the file is not found. I am using this as you show and it works fine for me.
Nevermind!
Found myself a way...
In the app, I clicked this icon:
The I dragged and dropped the file... and voilà!
Now, I used this:
$(include=[lib://TESS:DataFiles/Colours.txt]);
It worked!
When checking my load script, there is a tiny icon beside the $(include=...) sentence that pops up this:
So, it's there 😉
Thanks, @morgankejerhag
Yes, I noticed that - it was not a mistake, because I did create a QVS file, but it was not working for me...
Now I found the solution...
Thanks for the time to reply.
Cheers,
~Demian