Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
how to declare a script variable, which value depend from a value from a selection in a sheet Object and then I load the script new.
your Help will be so welcome.
thanks in advance
Frédéric
Hello,
You can use Input Variable Object.
1. Declare a variable in Vizsualization part:
2. Create Input Variable Object linked to this variable.
3. Use the variable in script.
Ex: Trace '$(vInputVariable)';
Good Luck!
If you use GetFieldSelections() to define the variable (vVar1), then you can do this:
1. Define a second variable (vVar2)
2. Add a button object
3. Add a "Set Variable Value" action and set vVar2 = '$(vVar1)'
4. Add a "Reload Data" action to the same button
5. Select a value
5. Click Button
Have a nice day.
Hello, now it works and without an InputBX, just with the button and the set variable
Hello, it is not possible to change the value of a script variable according to selections. However, you can create variables directly in the visualization part that you can control with the variable input component.
Variable input control | Qlik Sense on Windows Help
Hello,
You can use Input Variable Object.
1. Declare a variable in Vizsualization part:
2. Create Input Variable Object linked to this variable.
3. Use the variable in script.
Ex: Trace '$(vInputVariable)';
Good Luck!
Good, but I use the function GetFieldSelections to have my value in qlik and then in the script I use the variable REFNUM but the script use the function and not the value behind.
If you use GetFieldSelections() to define the variable (vVar1), then you can do this:
1. Define a second variable (vVar2)
2. Add a button object
3. Add a "Set Variable Value" action and set vVar2 = '$(vVar1)'
4. Add a "Reload Data" action to the same button
5. Select a value
5. Click Button
Have a nice day.
No it doesn't work for me, i don't understand why but in the script the error is that in the Where clause, the variable vVar2 is blank.
Hello, now it works and without an InputBX, just with the button and the set variable