0

This is probably one of the basic questions I will ever ask, but at the moment I am stumped and cant work out how to do it

I need a validation rule to look at the field “Canada_Email_Consent__c” if picklist value equals "Yes" then make field “Canada_Consent_Field__c” mandatory

Field API : Canada_Email_Consent__c Data Type : Picklist Values : Yes No

Field api :Canada_Consent_Field__c Date Type : Picklist

This is my formula

IF(
    AND(
        ISPICKVAL(Canada_Email_Consent__c) = "Yes", 
        ISPICKVAL(Canada_Consent_Field__c)), True, False
 )

Looking forward to your response

2
  • ISPICKVAL expects two parameters. Try IF( AND( ISPICKVAL(Canada_Email_Consent__c,"Yes"), ISPICKVAL(Canada_Consent_Field__c,"")), True, False )
    – highfive
    Commented Jun 23, 2014 at 9:08
  • Thank you highfive. I have a feeling today is going to be a long day ha
    – user8746
    Commented Jun 23, 2014 at 9:16

1 Answer 1

1

Function ISPICKVAL() is expecting two parameters but you are giving only one. Alter your formula to,

IF(
   AND(
     ISPICKVAL(Canada_Email_Consent__c,"Yes"),
     ISPICKVAL(Canada_Consent_Field__c,"")
   ),
 True, False  
)

For get more detail have look at here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .