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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is the difference between '$(Var)' and $(Var)

On the script I have noticed no difference between '$(Var)' and $(Var). I suppose that the ' forces the $(Var) as a string.

Thanks in advance

Fabio

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The $(Var)-construction will be replaced by the value of the variable "Var" when the script runs.

So, if "Var" equals the string ABC, then the $(Var) will be replaced by ABC and this will be interpreted as e.g. a field name, by the script parser. Whereas '$(Var)' will be read as 'ABC', which is a literal, e.g. a field value.

View solution in original post

1 Reply
hic
Former Employee
Former Employee

The $(Var)-construction will be replaced by the value of the variable "Var" when the script runs.

So, if "Var" equals the string ABC, then the $(Var) will be replaced by ABC and this will be interpreted as e.g. a field name, by the script parser. Whereas '$(Var)' will be read as 'ABC', which is a literal, e.g. a field value.