Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm never quite sure when to use =, either when declaring a variable or in an expression.
Can someone please advise?
Thank you!
Hi,
Essentially, the equals sign will force the variable to be evaluated before passing to whatever expression you are using it in. For example, say you had a variable vMaxSales. If you put this in the variable settings:
Max(Sales)
and then in a text object put =vMaxSales, then you would get the actual words "Max(Sales)" returned.
However, if your variable had the equals sign:
=Max(Sales)
then your text object would return the evaluated expression (e.g. 4919).
You could also not use the equals sign in the variable, but instead force the variable to be evaluated in the epxression - so in your text box you could put:
=$(vMaxSales)
By using the dollar-sign expansion in the expression, it doesn't matter if there is an equals sign or not.
See attached,
Hope this helps,
Jason