Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to do NOT evaluate a variable value

I have a variable named $Expression and I need to display the content of that variable in a text object. However, when I try to do that, instead of show the content of the variable, the value of the variable is evaluated.

For example, let's say the $Expression is set by the user to be Type='B'. I want to show Type='B' in a text object but instead, the text object evaluates the variable and only shows true or false as a result of the expression evaluation.

Any ideas?

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution, it is not evaluating the expression.

You just give

=variableName

don't give $(variableName)

Regards,

Jagan.

View solution in original post

5 Replies
maxgro
MVP
MVP

set var='Type=' & chr(39) & 'B' & chr(39);

textbox

=$(var)

adriansalas
Contributor III
Contributor III

try:

Set $Expresion = 'B'

for declare static variable.

Not applicable
Author

Thank you guys for the quick reply but that is not an option. Set statement is for load script and this expression variable will be changed by the user in an input box. It is not assigned during load script.

I know how to define the variable, my problem is how to show in a text object without evaluating the variable value.

By the way, for many reasons will take a lot to explain, display in an input box is not an option.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution, it is not evaluating the expression.

You just give

=variableName

don't give $(variableName)

Regards,

Jagan.

Not applicable
Author

That worked.

Thanks, Jagan.