You need to sign in to do that
Don't have an account?

Need help with a nested If formula for Validation rule pls!
Hello all,
I have a Lead validation rule using an IF statement that works as follows:
IF(AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , "") ),TRUE, FALSE)
This IF statement works fine for checking 2 picklist values of 2 different lead picklist fields. However, I want to add another IF condition such as:
IF(AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , "Bad Email") ),TRUE, FALSE)
How would I combine these 2 IF statements or merge into a Case function? The idea is if either of these 2 IF statements evaluate to True then the Lead Validation rule error message will display.
Thanks.
Hi,
You can use AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , ""))|| AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , "Bad Email")) like this.
Please accept as solution if it works .
All Answers
Hi,
You can use AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , ""))|| AND(ISPICKVAL(Status, "Junk") , ISPICKVAL(junk_reason__c , "Bad Email")) like this.
Please accept as solution if it works .
Nested ifs example would be IF(logical_test, value_if_true, value_if_false). there should be a criteria in the logical_test and in the value_if_true another IF should be inserted.