cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with my Conditional IF Statement

Former Member
0 Kudos

Hi Experts,

I have the following expression defined in my VC model however, it keeps on showing the wrong value, i.e. Declined:

=IF(@VALUE=='0','Pending',IF(@VALUE=='1','Approved','Declined))

The values should be if 0 then Pending, if 1 then Approved and if 2 then declined.

It appears to only be reading the final IF statement - can anyone offer some guidance on where I have gone wrong?

Thanks,

Bim.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try with following expression -

bool(IF(@VALUE=="0","Pending",IF(@VALUE=="1","Approved",IF(@VALUE=="2","Declined"))

Regards

Sandeep

Former Member
0 Kudos

Hi Again Sandeep,

The code eventually seemed to work (strange!), we just needed to update the BPM schema.

Many thanks for your help.

Bim.

Answers (1)

Answers (1)

Former Member
0 Kudos

If @Value is numeric then remove '' for ZERO, ONE & TWO