Skip to main content
I'm struggling with a validation rule on account address. I'm trying to build it up piece by piece but I can't even get the first part to work.

 

We use the Account Country picklist to populate the Billing Country field. To start with I want to say:

 

If the account Country is United Kingdom, and the city does not equal London, then Billing City, Billing State and Billing PostCode must be populated.

 

I'm falling over at the first hurdle, how do I get the validation rule to recognise when the account Country is United Kingdom?

 

The rule is currently

 

ISPICKVAL( Account_Country__c , 'United_Kingdom')

 

And it allows me to save a record with the account country of United Kingdom without stopping me.  Why is that?
5 件の回答
  1. 2016年1月21日 16:29

    Also, the final Validation rule will look like this:

    AND(

    ISPICKVAL(Account_Country__c, "United Kingdom"),

    BillingCity <> "London",

    OR(

    ISBLANK(BillingState),

    ISBLANK(BillingPostalCode)

    )

    )

     

    Always insert Field names using the Insert Field button on the formula editor. And it's a text field, just use the field name, if it's a picklist wrap it in a TEXT function.
0/9000