Skip to main content
Hi, 

I have the following validation rule 

AND(

OR( AQB__AccountDefaultCountry__c  = "USA", AQB__AccountDefaultCountry__c = "United States", AQB__AccountDefaultCountry__c = "US",ISBLANK(AQB__AccountDefaultCountry__c)),

LEN( AQB__AccountDefaultCity__c ) > 0,

NOT(REGEX( AQB__AccountDefaultZipCode__c , "\\d{5}(-\\d{4})?")) 

)

&& $Setup.rh2__PS_Settings__c.rh2__Run_Validation_Rule__c

and I need to add the following criteria in the first parantheses AQB__BillingStatus__c  <> "Lost", "Omit from Mailings"

In other words if Address Status is not Lost or Omit from mailings, then run the validation rule. 

What is the correct format in the formula to acomplish this?

 
5 respuestas
  1. 21 jul 2017, 23:03

    Please try below validation rule and let us know if this will help you

    AND(

    AND(text(AQB__BillingStatus__c) != "Lost", text(AQB__BillingStatus__c) != "Omit from Mailing" ),

    OR( AQB__AccountDefaultCountry__c = "USA", AQB__AccountDefaultCountry__c = "United States", AQB__AccountDefaultCountry__c = "US",ISBLANK(AQB__AccountDefaultCountry__c)),

    LEN( AQB__AccountDefaultCity__c ) > 0,

    NOT(REGEX( AQB__AccountDefaultZipCode__c , "\\d{5}(-\\d{4})?"))

    )

    && $Setup.rh2__PS_Settings__c.rh2__Run_Validation_Rule__c

    Let us know if this will help you

     
0/9000