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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepali_more
Creator
Creator

LET and SET redefined

Hello,

i know the difference between Let & Set keywords.but i have a scenario where in i have defined a variable using Set Keword but i waant to evaluate the string in that variable. How this can be achieved?

5 Replies
tamilarasu
Champion
Champion

Hi,

Like this.?

SET v1   =  '4+5';

LET v2   = Evaluate(v1);

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Dollar expand it: LET vMySecondVar = $(vMyFirstVar);


talk is cheap, supply exceeds demand
hic
Former Employee
Former Employee

... or even simpler: Don't dollar-expand it.

Let vMySecondVar = vMyFirstVar;

HIC

tresesco
MVP
MVP

Set vMyFirstVar = 5+6;

Let vMySecondVar = vMyFirstVar;


vMySecondVar  doesn't seem to evaluate the string, it returns the string as it is.

In that case vMySecondVar  would required to be dollar-expanded, right?

hic
Former Employee
Former Employee

You're right. I missed that. Evaluate or dollar expansion will both store 9 in the second variable, whereas the plain Let will store 4+5.

HIC