Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Architect
Partner - Creator
Partner - Creator

Difference in outcome after assigning file path using LET and SET

Hi, can you please let me know if there will be any difference in outcome for the below expressions?

1> SET vPath = .\includes\include.txt;

2> LET vPath = '.\includes\include.txt';

3> LET vPath = .\includes\include.txt;

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Yes, no 1 and no 2 will be the same. I'm not sure if No 3 will work at all. Using LET the variable will be evaluated when running the script and I don't think that a string without quotes will run without errors.

This is easier to explain using a function like Today().

Let var =Today() will set the variable to the  date when the script is ran. 

Set var = today() will set the variable to today() and will therefore be calculated when the variable is called. So if you reload the app today and call it in an expression tomorrow then tomorrow's date will be presented. 

View solution in original post

1 Reply
Vegar
MVP
MVP

Yes, no 1 and no 2 will be the same. I'm not sure if No 3 will work at all. Using LET the variable will be evaluated when running the script and I don't think that a string without quotes will run without errors.

This is easier to explain using a function like Today().

Let var =Today() will set the variable to the  date when the script is ran. 

Set var = today() will set the variable to today() and will therefore be calculated when the variable is called. So if you reload the app today and call it in an expression tomorrow then tomorrow's date will be presented.