Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sidneylu
Creator III
Creator III

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
sidneylu
Creator III
Creator III
Author

Thank you.  This works for me.

View solution in original post

6 Replies
stigchel
Partner
Partner

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

praveenavelagap
Creator III
Creator III

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

vFY =getfieldselections(YearField)

or

only(YearField)

sidneylu
Creator III
Creator III
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.

sidneylu
Creator III
Creator III
Author

Thank you.  This works for me.

View solution in original post

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.