function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Terry_0101Terry_0101 

How to require certain picklist values?

How to require certain picklist values, when a date field is populated?
Amit Chaudhary 8Amit Chaudhary 8
You need to create validation rule for same

AND(
       Not( IsBlank(Date_Field__c)),
       NOT( ISPICKVAL(Country_Served__c, "United States"))
)
 
RD@SFRD@SF
Hi Terry,

Use this formula in the validation rule with an appropriate message.
 
IF(NOT(ISNULL(Date field)),IF(ISPICKVAL(picklist field,''),TRUE,FALSE),FALSE)

Hope it helps
RD
Nishad KNishad K
Hi Terry,

Try Like this:
AND(
       NOT( ISBLANK(Date_Field__c)),
       NOT( ISBLANK(TEXT(Picklist__c)))
)

Regards,
Nishad Kallingal
Nishad KNishad K
if it's resolved, mark the answer  and keep the community clean!!