Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Samanehsorournejad

How to Read Variable from Include txt File

Hi Every body,

I have try to read my Data and Variables via Include      I have one txt file for my Tables and another for my Variables, 

and in Qlik Sense Editor I had read my txt files. But the Problem is that Qlik Sense does not Know the variables that I had written in my txt files, Please help me how I should call my variables that Qlik sense could know them,

just for Info: $(variablename  )     OR  = variablename  I had tried but it does not Answer 😞

😣

 

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

You need to tell us more about what you do. Otherwise it is not possible to see what's wrong.

I just tested the following script, and it works fine. First, I have an include statement that points to a file with a single Set statement that defines a variable called x. Then I use this variable inside a Load statement.

// ======

$(include=lib://Dropbox/Data/Variables.qvs)

Load * Inline
[Field
1
2
$(x)];

View solution in original post

2 Replies
hic
Former Employee
Former Employee

You need to tell us more about what you do. Otherwise it is not possible to see what's wrong.

I just tested the following script, and it works fine. First, I have an include statement that points to a file with a single Set statement that defines a variable called x. Then I use this variable inside a Load statement.

// ======

$(include=lib://Dropbox/Data/Variables.qvs)

Load * Inline
[Field
1
2
$(x)];

Samanehsorournejad
Author

Hallo Henric,

thank a lot for your answer, yes it works like this that you write

$(Include=lib://..............variable.txt);