Page 1 of 1

EVALUATE MULTIPLE CONDITION and SINGLE CONDITION

PostPosted: Fri Sep 28, 2012 3:14 am
by yogeshvalhe
Hello,

I had a question on EVALUATE statement. I am aware that, there can be multiple condition check in WHEN clause with usage of ALSO verb.

My question is that, I have a requirement in WHEN clause, I want to compare single and multiple conditions single EVALUATE statement.
E.g.
EVALUATE TRUE
WHEN A
MOVE 'AAAA' TO OUT-PUT
WHEN A ALSO B
MOVE 'AABB' TO OUT-PUT
WHEN A ALSO D
MOVE 'AADD' TO OUT-PUT
WHEN B ALSO D
MOVE 'BBDD' TO OUT-PUT
WHEN OTHER
MOVE 'OTHER' TO OUT-PUT
END-EVALUATE.

So, my question is, can we have WHEN condition for single comparison and multiple comparison. (actually, I have coded like this, but its not working, may I am doing something wrong or it is not possible)

can someone suggest to handle the situation above. Thank you for your help.

Tks, YV

Re: EVALUATE MULTIPLE CONDITION and SINGLE CONDITION

PostPosted: Fri Sep 28, 2012 3:44 am
by BillyBoyo
Suggest you check in the Language Reference. You'll need TRUE ALSO TRUE on the EVALUATE, you'll also have to be very careful of the order. Your WHEN A ALSO B and A ALSO D will never be true, because you've already got WHEN A (for which you'll need ALSO ANY).