Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

passing variable to script

I am not sure what to search for or even if this is possible. Here is what I want to do. I have an application with multiple fields but in one field (Number)I have the values 1,2,3,4,5. What I want to do is have the user select a Number and then reload(via a button) where Number = Selected value. I just need to know how I would pass that selected variable to the script for execution. I need to update data that is constantly being updated but, different users will only need to see certain Numbers. Any ideas?

2 Replies
prieper
Master II
Master II

You are able to read the content of each variable in the script, just create an inputbox, into which your user has to enter his choice (alternatively the inputbox might be filled with the result of a field-selection) and use it in the script by using IF MyVariable = .... THEN .... ELSE or with CASE-functionality.

HTH
Peter

Anonymous
Not applicable
Author

Adding to Peter's comment...
You can use variable in the script in many ways. The syntax is $(variable). I think you want it as condition on reload:
LOAD (or SELECT)
...
WHERE Number=$(MyVariable);