Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
chandu441
Contributor

How to store a field selection value from UI to backend script variable???

Hi All,

I am facing typical requirement like,,,

user will select the value from "Year: ListBox from that I have to save the Year Selected value as a variable in script level. So that I can define PastYear Value.

LET vFPrevYear = vFYEAR - 1;

Same as like that I have to store Quarter Selected Values from list based on that I will get the values  vPrevQtr  & vPrevQtrYear.

IF vQuarter > 1 THEN

  LET vPrevQtr = vQuarter1 - 1;

  LET vPrevQtrYear = vFYEAR1;

ELSE

  LET vPrevQtr = 4;

  LET vPrevQtrYear =  vFYEAR1 - 1;

END IF;


As of now i am saving the values from front end using "=GetFieldSelections(YEAR1)". but it is not getting me the output from script side.

Please suggest me a solution which will helpful for me.

Thanks all of you....

2 Replies
Partner
Partner

Re: How to store a field selection value from UI to backend script variable???

Use Set Variable action for your Sheet trigger called OnLeaveSheet.

See below. Just add the desired value or field value that the variable needs.

QVpost.PNG

chandu441
Contributor

Re: How to store a field selection value from UI to backend script variable???

Sorry your suggestion wont work for dynamically changing year value. So I created all the variables from UI Level only rather than Script Level. It works for my scenario.

Thanks