You need to sign in to do that
Don't have an account?
Combine IF statements
I'm trying to take this statment and then add the second block so that it all works together, but no matter how I try it I get syntax errors of varying types.
Any help on combining the two would greatly be appreciated.
IF(Desired_Record_Type__c = "Lead", IF(NOT(isBlank(SSN__c)) || (NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)) && (NOT(isBlank(Mobile_Phone_Override__c )) || NOT(isBlank(Primary_Email_Override__c)))), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) )
IF(Desired_Record_Type__c = "Prospect", IF(NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) )
Any help on combining the two would greatly be appreciated.
It seems you want to put the mentioned 2 if blocks together in formula.I am assumming your formula return type is Checkbox i.e. boolean then you can try something like below
IF(Desired_Record_Type__c = "Lead", IF(NOT(isBlank(SSN__c)) || (NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)) && (NOT(isBlank(Mobile_Phone_Override__c )) || NOT(isBlank(Primary_Email_Override__c)))), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) ) &&
IF(Desired_Record_Type__c = "Prospect", IF(NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) )
In this way you can add multiple If blocks together.
Hope this can help !!
Thanks
Arpit
All Answers
It seems you want to put the mentioned 2 if blocks together in formula.I am assumming your formula return type is Checkbox i.e. boolean then you can try something like below
IF(Desired_Record_Type__c = "Lead", IF(NOT(isBlank(SSN__c)) || (NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)) && (NOT(isBlank(Mobile_Phone_Override__c )) || NOT(isBlank(Primary_Email_Override__c)))), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) ) &&
IF(Desired_Record_Type__c = "Prospect", IF(NOT(isBlank(First_Name_Override__c )) && NOT(isBlank(LastName)), true, false ), IF(NOT(isBlank(LastName)) && (NOT(ISBLANK(Mobile_Phone__c)) || (NOT(isBlank(Email)) && NOT(isBlank(Brand__c))) || (NOT(isBlank(Email)) && NOT(isBlank(Company)))), true, false ) )
In this way you can add multiple If blocks together.
Hope this can help !!
Thanks
Arpit
Just wanted to check if above solution provided helped you or not. If it does please mark it as Best Answer, so that it can help others also with the same problem.
Thanks
Arpit