You need to sign in to do that
Don't have an account?
Renee Marie Prorok
Multiple OR statements with an And statement
Having trouble getting this to work - if I take out one of the OR statements, it works, but the value needs to be checked against both OR statements. Any advice?
AND(
NOT(ISBLANK( Service_Provider__c )),
OR(
Service_Provider__r.Customer__r.Customer_Key__c <> Related_Property_Customer__c,
Service_Provider__r.Customer__r.Customer_Key__c <> "gobydataservices"))
AND(
NOT(ISBLANK( Service_Provider__c )),
OR(
Service_Provider__r.Customer__r.Customer_Key__c <> Related_Property_Customer__c,
Service_Provider__r.Customer__r.Customer_Key__c <> "gobydataservices"))
It sounds like you only want this formula to evalute to true if the Customer_Key__c field is neither of those values. But because of the OR statement, if Customer_Key__c is either one of the values specified, the formula will still evaluate to true as long as Service_Provider__c is not blank.
For example, if Customer_Key__c is "gobydataservices", the OR statement will still be true because Customer_Key__c is NOT EQUAL to Related_Property_Customer__c.
If you change that OR statement to an AND statement, then the formula will only evaluate to true if Service_Provider__c is not blank and Customer_Key__c is neither of the specified values.
I hope this helps! Please let me know if I am misunderstanding the requirement and/or you would like extra explanation.
All Answers
It sounds like you only want this formula to evalute to true if the Customer_Key__c field is neither of those values. But because of the OR statement, if Customer_Key__c is either one of the values specified, the formula will still evaluate to true as long as Service_Provider__c is not blank.
For example, if Customer_Key__c is "gobydataservices", the OR statement will still be true because Customer_Key__c is NOT EQUAL to Related_Property_Customer__c.
If you change that OR statement to an AND statement, then the formula will only evaluate to true if Service_Provider__c is not blank and Customer_Key__c is neither of the specified values.
I hope this helps! Please let me know if I am misunderstanding the requirement and/or you would like extra explanation.