Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

alanmcgrath
Contributor

Variable definition now shows value instead of expression

I have a QVW where I have set several variables in the variable overview.  All of these I set as expressions.  This has worked fine for the past several months but this month when I reloaded the data the variables now just show the value and no longer the expression.  Has anyone had this happen before and know how to fix it?  I did not change any script so no clue as to why this happened and now the qvw is not working properly.

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Variable definition now shows value instead of expression

19 Replies
MVP & Luminary
MVP & Luminary

Re: Variable definition now shows value instead of expression

Are your variables defined in the Script? It sounds like they are being created in the script with a LET statement instead of a SET statement.

-Rob

alanmcgrath
Contributor

Re: Variable definition now shows value instead of expression

I set all the expressions in the variable overview.  For example one of my variables was

=If(vLeaverToggle=1 and vYOYAChart=1 and vMngdRadio=1,1,0) . 

Now after the reload is shows the value of 1 in the variable overview.  I'm not sure if some setting changed or what happened.

Not applicable

Re: Variable definition now shows value instead of expression

What is the purpose of the expression?

i would think that the vLeaverToggle, vYOYAChart, VMngdRadio are indeed for the variable overview, but the expression itself could be used in the chart (?) that you are using.

alanmcgrath
Contributor

Re: Variable definition now shows value instead of expression

This particular expression sets the value as 1 or 0 for the variable vHeader. So it works as a conditional show based on selections made within the QVW.  This is just one of over a hundred variables that perform various functions that I have set in the Variable Overview section.  Each one that had an expression within the definition section no longer shows that expression but rather the resulting value.  This happened after I reloaded the data this month. Before that there was no issue.  I need to get those expressions back so they will calculate properly because as of right now it is as if everything has been hard coded.

MVP & Luminary
MVP & Luminary

Re: Variable definition now shows value instead of expression

It does indeed look like the  variable is getting evaluated. Are the variables mentioned in the script at all? What version and SR of QV are you using?

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

alanmcgrath
Contributor

Re: Variable definition now shows value instead of expression

The variables I have set in the variable overview are not referenced in the script.  I do have some variables in the script but those are related to the master calendar and for ranges.  I'm on version 11.20.12904.0 SR 12

Partner
Partner

Re: Variable definition now shows value instead of expression

Hi,

Like Rob says the expressions are being evaluated,

Were they just typed in the variable overview.

A quick way to prove this, try removing the = at the start and see if this corrects the issue.

Mark

alanmcgrath
Contributor

Re: Variable definition now shows value instead of expression

Yes the expression was typed in the variable overview definition but now the expression is not there at all. it only shows the value.  So it is as if it evaluated the expression and then replaced the expression with the value.

I'm trying to figure out how the expressions disappeared and how to get them back. Example below:

Here is a view of the variable overview from an old version of my report.  You can see here the expression for the  variable vAvailable.  You can also see others there in the list. Now see 2nd image...

As you can see here (below) in my latest version, these expression are now gone and replaced by the numbers. Any idea how this happened and how I can get the expressions back without rewriting each one?

MVP & Luminary
MVP & Luminary

Re: Variable definition now shows value instead of expression

Are you setting the variables with an action? Perhaps in the OnOpen trigger?

-Rob

http://masterssummit.com

http://qlikviewcookbook.com