Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR April 23, 2025: Iceberg Ahead: The Future of Open Lakehouses - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
DEMONIO_AZUL
Contributor III
Contributor III

Qlik Cloud Analytics - calling a TXT file containing a script

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:

DEMONIO_AZUL_0-1741115995119.png

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:

DEMONIO_AZUL_1-1741116172304.png

And in my app's load script, I am using this:

$(include=[lib://TESS:DataFiles/Colours.qvs]);

When I use 

DEMONIO_AZUL_2-1741116329824.png

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!

Labels (2)
1 Solution

Accepted Solutions
DEMONIO_AZUL
Contributor III
Contributor III
Author

Nevermind!

Found myself a way...

In the app, I clicked this icon:

DEMONIO_AZUL_0-1741117107373.png

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:

DEMONIO_AZUL_1-1741117303592.png

So, it's there 😉

 

View solution in original post

3 Replies
morgankejerhag
Partner - Creator III
Partner - Creator III

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.

DEMONIO_AZUL
Contributor III
Contributor III
Author

Nevermind!

Found myself a way...

In the app, I clicked this icon:

DEMONIO_AZUL_0-1741117107373.png

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:

DEMONIO_AZUL_1-1741117303592.png

So, it's there 😉

 

DEMONIO_AZUL
Contributor III
Contributor III
Author

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