About EasyMorph Tutorials & Examples Web-help

AND error with latest version

Hi community,

Below formula was working fine since last 6 months but I did a version upgrade and getting the below error in EM. Could you please help me reconstruct the formula with correct syntax?

Error :slight_smile: if( and ([Team]=“Dormant”,
or ([Status]=“Not Prepared”,[Status]=“System Decertified”)
),“TBA”,
if([Team]="",“TBA”,if([Team]=“TBA”,“TBA”,“ok”))
)

The correct syntax should be:

if( [Team]="Dormant" and
    ([Status]="Not Prepared" or [Status]="System Decertified")
    ,"TBA",
    if([Team]="","TBA", if([Team]="TBA","TBA","ok"))
)

I highly recommend using the new IF/THEN/ELSE operator - it’s better for readability:

IF [Team]="Dormant" and ([Status]="Not Prepared" or [Status]="System Decertified")
    THEN "TBA"
    ELSE 
       IF [Team]="" THEN "TBA"
       ELSE 
          IF [Team]="TBA" THEN "TBA" ELSE "ok"

The Rule action is even a better fit for complex nested conditions.

1 Like

Thanks @dgudkov

To learn more about EasyMorph visit easymorph.com.