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
FatemehFatemeh 

Validation Rule for a specific Multi-Picklist value requiring a mandatory picklist field to not be left blank

Hello!

Would you please help with a validation rule I am trying to create to enforce users to select any picklist value in field #2 if a specific value (Roadmap) is selected in the multi-select picklist field #1.

Field #1 (multi-select picklist) : Task_Type__c
Field #2 (picklist) : Enhancement_Impact__c

The VR won't snag when I select "Roadmap" and leave "Enhancement Impact" blank (as it should), but it snags when I try to change Roadmap back to blank. I tried modifying the "NOT" part w/o success.

AND( 
INCLUDES( Task_Type__c , "Roadmap" ), 
NOT(ISBLANK( TEXT( Enhancement_Impact__c )) 
))

Thank you in advance! :)
Best Answer chosen by Fatemeh
PriyaPriya (Salesforce Developers) 
Hi Fatemah,

You should try this formula :-
 
INCLUDES( Task_Type__c , "Onion" ) && ISPICKVAL( Enhancement_Impact__c , '')

Enhancement_Impact__c this is a picklist field then we should always use 'ISPICKVAL' function.

If this work, kindly mark it as the best answer so that it can help others.

Thanks & Regards,

Priya Ranjan

All Answers

FatemehFatemeh
I forgot to mention I tried this, as well - this is the one that would snag when I would try to change Roadmap back to blank, I think - I've been trying many different paths. 

AND( 
NOT(INCLUDES( Task_Type__c , "Roadmap" )), 
ISBLANK( TEXT( Enhancement_Impact__c )) 
)
PriyaPriya (Salesforce Developers) 
Hi Fatemah,

You should try this formula :-
 
INCLUDES( Task_Type__c , "Onion" ) && ISPICKVAL( Enhancement_Impact__c , '')

Enhancement_Impact__c this is a picklist field then we should always use 'ISPICKVAL' function.

If this work, kindly mark it as the best answer so that it can help others.

Thanks & Regards,

Priya Ranjan

This was selected as the best answer
FatemehFatemeh
Thank you Priya. That did not work. Do you have any other ideas please?
FatemehFatemeh
My apologies! It worked...I changed " " to ' ' and it worked! THANK YOU!!!