Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Alexia_Frn02
Contributor
Contributor

How to properly read a variable from a text file ?

Hi everyone, I would like to read a variable in a text file but I am currently facing an issue.

If I use a Load Inline, as shown below, it work perfectly.

LET V_Version = '1.0';

MyLoadInline:

LOAD * INLINE [

 IDTEXT,Message

1,Your version of the application is ($(V_Version))

];

In the Data Model the value of the field Message will be : Your version of the application is (1.0) .

But, as soon as I try to load the text from a text file it doesn't work anymore.

In my .txt file I simply have :

IDTEXT | Message

1 | Your version of the application is ($(V_Version))

LOAD * FROM MyFile;

This time in the Data Model the value of the field Message will be : Your version of the application is ($(V_Version)).

Do you have any suggestions to solve my problem ? 

Thank you in advance.

Alexia

1 Reply
Lauri
Specialist
Specialist

Load IDTEXT,
'Your version of the application is $(V_Version)' as Message;
LOAD IDTEXT FROM MyFile;