Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to use variables in script

hi

am created two input boxes with two variables n,n1

how to use the evaluate() in script

to add two variables and disply in front end

is it possible

thanks in advance

2 Replies
rubenmarin

Hi hari, you can retrieve the content of the variables using $(VariableName).

Note that this will retrieve the content of the variable, not the result, so for example if you have a variable name vMaxYear, and the user sets 2016 as the content you can use this in script like this:

SELECT fields FROM table WHERE YearField<=$(vMaxYear);

// Is converted to: SELECT fields FROM table WHERE YearField<=2016;

But if the user set as variable content =Max(Year), in front-end you can see the variable as 2016, but in script it will return an error in the previous example:

// Is converted to: SELECT fields FROM table WHERE YearField<==Max(Year);

Not applicable
Author

thank you ruben