12 Replies Latest reply: Sep 23, 2015 5:47 AM by Michal Kwater

# set variable

Hello,

I would like to set a variable in expression :

Expression :

sum({\$<Round={'6'}>} Points)

instead of 6 the variable should be : vLast

vLast = Max({\$<Played={'1'}>} Round)
I put it in a script (also tried in Variable overview)
SET vLast = Max({\$<Played={'1'}>} Round).

but when I put
sum({\$<Round={vLast}>} Points)
the expression is not working.
Separately expressions sum({\$<Round={'6'}>} Points) and Max({\$<Played={'1'}>} Round) are working.

Can somebody have any idea ?

• ###### Re: set variable

Try with

sum({\$<Round={\$(vLast)}>} Points)

or

sum({\$<Round={\$(=vLast)}>} Points)

let me know

• ###### Re: set variable

both doesn't work

• ###### Re: set variable

Could you please share an example doc

• ###### Re: set variable

sum({<Round= {"=(Max({\$<Played={'1'}>} Round))"}>}   Points)

or

sum({\$<Round={"=\$(vLast)"}>} Points)

• ###### Re: set variable

TRY :

sum({<Round={"=\$(vLast)"}>} Points) OR

sum({<Round={'=\$(vLast)'}>} Points)

khushboo

• ###### Re: set variable

PFA...

• ###### Re: set variable

Hi,

The main issue with your variable is you're passing integer as strings using double quote.

If you remove the double quote from you integer your variables should work.

SET vLast = Max({\$<Played={1}>} Round);

//Max({\$<Played={1}>} Round) this is from variable overview

• ###### Re: set variable

Thank you all !!