An administrator needs to enforce a data quality requirement on the Contact object. Whenever a contact's custom picklist field `Contact_Status__c` is set to 'Active', the `Tax_Identification_Number__c` text field must not be left blank. Which validation rule formula correctly prevents saving the record when this requirement is violated?
- AND( ISPICKVAL(Contact_Status__c, 'Active'), ISBLANK(Tax_Identification_Number__c) )Answer
- BAND( Contact_Status__c = 'Active', Tax_Identification_Number__c = NULL )
- COR( ISPICKVAL(Contact_Status__c, 'Active'), ISBLANK(Tax_Identification_Number__c) )
- DAND( ISPICKVAL(Contact_Status__c, 'Active'), NOT(ISCHANGED(Tax_Identification_Number__c)) )
Answer
The correct formula is AND( ISPICKVAL(Contact_Status__c, 'Active'), ISBLANK(Tax_Identification_Number__c) ). Validation rules trigger an error when the formula evaluates to TRUE. Combining ISPICKVAL for picklist evaluation and ISBLANK for text field null checking within an AND statement ensures the error only fires when the status is Active and the required field is missing.
The formula correctly uses ISPICKVAL to evaluate the custom picklist value and ISBLANK to verify whether the text field is empty. Enclosing both conditions within the AND function ensures that the validation error fires only when the contact is set to 'Active' and the Tax Identification Number is missing.
Step-by-Step Solution
Key Concept
Validation Rule Logic and Null Value Handling
Estimated Time:1m 30s