Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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.

View solution in original post

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.