on 2016 Aug 29 8:51 AM
Dear All,
I've got a quick question.
I need to put in my script logic the following condition
if %value% is between 0-5000 it is %value% * 2
elseif %value% is between 5001-7000 the result is %value *3
else %value% *4
*REC(EXPRESSION = ( 0 < %VALUE% < 5000) ? %VALUE% * 2 : 0)
*REC(EXPRESSION = ( 5001 <= %VALUE% < 7000) ? %VALUE% * 3 : 0 )
*REC(EXPRESSION = ( %VALUE% >= 7000) ? %VALUE% * 4 : 0 )
this is delivering acumulated values if I put 8000 as %VALUE (and it is wrong)
any tips?
thanks
Request clarification before answering.
If you have JavaScript calculation engine the correct syntax will be:
*REC(EXPRESSION=(%VALUE%>0)? ((%VALUE%<5000)? %VALUE%*2 : 0) : 0)
*REC(EXPRESSION=(%VALUE%>5000)? ((%VALUE%<7000)? %VALUE%*2 : 0) : 0)
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where have you seen this syntax???
0 < %VALUE% < 5000
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 7 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.