Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Refresh a variable without reloading the app

Hi,

Say I have a variable called vFY as in

vFY = 2016

I have expressions that use vFY in my calculations that I display using Text Box.  If I change the above line to

vFY = 2015.

How can I refresh my expressions without reloading the app?  I want to see new calculations reflected in my

Text Box.  Is this possible?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thank you.  This works for me.

View solution in original post

6 Replies
stigchel
Partner - Master
Partner - Master

I assume you set the contents of this variable in the load script and now want to change it in the gui?

You can add an input box where the user can change the contents of the variable

Anonymous
Not applicable
Author

I believe this vFY variable should change based on user Year selections!!

vFY =getfieldselections(YearField)

or

only(YearField)

Anonymous
Not applicable
Author

I'm new to QV.  So I'm just exploring variables, expressions and set analysis.  This

is what I have in my test app.  Note I'm only showing the code that is needed to get my point

across.

vFY = 2015 -> under main tab in script editor

Then on the screen, I have a text box like this:

TextObject ='Total Amount for 2015 ($ expansion)- $' & sum({1<FY_pp={$(vFY)}>} Amount_pp) 

If I change vFY to 2016, how I can see the result on my text box without refreshing?  That

was my question. 

Thanks

neelamsaroha157
Specialist II
Specialist II

You can see the script variables in front end in 'Variable Overview'. If your vFY variable is being used only in front end then you can change its value from Variable overview and your expression will automatically get refreshed.

Anonymous
Not applicable
Author

Thank you.  This works for me.

mmarchese
Creator II
Creator II

You should mark the actual solution as the answer (not your "thanks" reply) so that people don't have to dig through the whole thread to figure out what the answer was.