Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two list boxes where user can select single value, and an input box. I have variables that pick up values using GetFieldSelections. When script is reloaded, a table containing one row is created, which is then joined to existing table values. My problem is that variables which set values using GetFieldSelections come across as formula not as value, i.e. '=GetFieldSelections(UserName)', instead of 'John'.
I've tried different syntax but could not get it working, any idea why? The app attached.
Scenario:
Load
'$(vSelectedName)' as User,
'$(vSelectedPeriod)' as ScenarioDate,
'$(vInput)' as [My Variable]
AutoGenerate (1);
Scenario:
LOAD *
FROM
Scenario.qvd
(qvd);
STORE Scenario into Scenario.qvd (qvd);

Thanks for the link Sunny, it works using triggers.
For anyone who is new to triggers like me, go to Settings / Document Properties / Trigger tab. Select Document Event Trigger called OnAnySelect, click Edit Action and create SetVariable Action.
and then edit the script:
let vSelectedName = '$(vaSelectedName)';
let vSelectedPeriod = '$(vaSelectedPeriod)';
Scenario:
Load
'$(vSelectedName)' as User,
'$(vSelectedPeriod)' as ScenarioDate,
'$(vInput)' as [My Variable]
AutoGenerate (1);
Scenario:
LOAD *
FROM
Scenario.qvd
(qvd);
STORE Scenario into Scenario.qvd (qvd);
Final app attached.
NOTE: The SAVE button only works in QlikView Desktop environment, it does not work on Access Point. There may be ways of doing it, but it is sufficient for me to have it working in Desktop.
Look at this post, Why variable with formula in script don't have the value , but the formula?, this should guide you in the right direction
Best,
Sunny
Hey, I guess trigger is the option for this.
Thanks for the link Sunny, it works using triggers.
For anyone who is new to triggers like me, go to Settings / Document Properties / Trigger tab. Select Document Event Trigger called OnAnySelect, click Edit Action and create SetVariable Action.
and then edit the script:
let vSelectedName = '$(vaSelectedName)';
let vSelectedPeriod = '$(vaSelectedPeriod)';
Scenario:
Load
'$(vSelectedName)' as User,
'$(vSelectedPeriod)' as ScenarioDate,
'$(vInput)' as [My Variable]
AutoGenerate (1);
Scenario:
LOAD *
FROM
Scenario.qvd
(qvd);
STORE Scenario into Scenario.qvd (qvd);
Final app attached.
NOTE: The SAVE button only works in QlikView Desktop environment, it does not work on Access Point. There may be ways of doing it, but it is sufficient for me to have it working in Desktop.
Not a problem, I am glad I was able to guide you in the right direction ![]()