The rule currently looks like this:
AND(
ISPICKVAL( Account_Country__c , 'United Kingdom')&&
Inactive__c <> TRUE,
OR(
BillingCity <>"London" ||
BillingCity <>"Glasgow" ||
BillingCity <>"Edinburgh" ||
BillingCity <>"Manchester" ||
BillingCity <>"Bristol"),
OR(
ISBLANK( BillingState ),
ISBLANK( BillingPostalCode ),
ISBLANK( BillingCity )
))
However, it returns the error message even if the City is Manchester, like this:
I don't want it to return an error for this sort of address, only if there are fields missing and the city is not in the list above.
Can anyone explain where I've gone wrong please?
Many thanks
1 个回答
Got it! (Not my solving, I had help). Posting the working formula just in case it helps anyone else, I was using OR when I should have used AND:
AND(
ISPICKVAL( Account_Country__c , 'United Kingdom'),
Inactive__c <> TRUE,
AND(
BillingCity <>"London" ,
BillingCity <>"Glasgow" ,
BillingCity <>"Edinburgh" ,
BillingCity <>"Manchester" ,
BillingCity <>"Bristol"),
OR(
ISBLANK( BillingState ),
ISBLANK( BillingPostalCode ),
ISBLANK( BillingCity )
))