Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare variables values in script

how do i do this?

set v1='x';

if $(v1)='x' then

set v2='y';

end if

is it possible?

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

You are almost there, just don't expand the variable

set v1='x'; if v1 ='x' then set v2='y';end if


Hope that helps.

View solution in original post

4 Replies
Miguel_Angel_Baeyens

Hi,

You are almost there, just don't expand the variable

set v1='x'; if v1 ='x' then set v2='y';end if


Hope that helps.

Not applicable
Author

Or, expand the variable but surround it with quotes:

if '$(v1)' = 'x' then

Not applicable
Author

thank you,

just to understand, in general what is the difference between writing $(v1) and v1 ?

Miguel_Angel_Baeyens

Hi,

Check this post about variables, expansion and evaluation.

Hope that helps.