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
Swapnil Patne 20Swapnil Patne 20 

Multiple fields required when a specific value is selected in picklist field

Hi,

Please can someone help with rectifying the error- surely I am missing something? Managed to create this formula to make fields required if certian picklist values are selected, but for some reasons it is not working.. (able to save the record without a value in required fields). Not sure if it is beacuse of type of fields as mentioned below in comments. 

AND( 
OR( 
ISPICKVAL(Contact_Status__c, "Unqualified / Inactive"), 
ISPICKVAL(Contact_Status__c,"Qualified & Actively looking"), 
ISPICKVAL(Contact_Status__c, "Passive C"), 
ISPICKVAL(Contact_Status__c,"Placed By Us"), 
ISPICKVAL(Contact_Status__c, "Contracting For Us")), 

AND ( 
ISBLANK(User_Group__c), [is a multi-picklist]
ISBLANK(TEXT(Domain__c)), [is a picklist] 
ISBLANK(TEXT(Industry__c)), [is a picklist] 
ISBLANK(Technology_Skills__c)))  [is a multi-picklist]

Would really appreciate your help here.

Thanks in advance.

Swapnil
 
Best Answer chosen by Swapnil Patne 20
Preya VaishnaviPreya Vaishnavi
Hi,

Please try the below.think you have to check if any of these fields are blank.Is that right?
AND( 
OR( 
ISPICKVAL(Contact_Status__c, "Unqualified / Inactive"), 
ISPICKVAL(Contact_Status__c,"Qualified & Actively looking"), 
ISPICKVAL(Contact_Status__c, "Passive C"), 
ISPICKVAL(Contact_Status__c,"Placed By Us"), 
ISPICKVAL(Contact_Status__c, "Contracting For Us")), 

OR( 
ISBLANK(User_Group__c), [is a multi-picklist]
ISBLANK(TEXT(Domain__c)), [is a picklist] 
ISBLANK(TEXT(Industry__c)), [is a picklist] 
ISBLANK(Technology_Skills__c)))  [is a multi-picklist]

 

All Answers

Preya VaishnaviPreya Vaishnavi
Hi,

Please try the below.think you have to check if any of these fields are blank.Is that right?
AND( 
OR( 
ISPICKVAL(Contact_Status__c, "Unqualified / Inactive"), 
ISPICKVAL(Contact_Status__c,"Qualified & Actively looking"), 
ISPICKVAL(Contact_Status__c, "Passive C"), 
ISPICKVAL(Contact_Status__c,"Placed By Us"), 
ISPICKVAL(Contact_Status__c, "Contracting For Us")), 

OR( 
ISBLANK(User_Group__c), [is a multi-picklist]
ISBLANK(TEXT(Domain__c)), [is a picklist] 
ISBLANK(TEXT(Industry__c)), [is a picklist] 
ISBLANK(Technology_Skills__c)))  [is a multi-picklist]

 
This was selected as the best answer
Preya VaishnaviPreya Vaishnavi
and it is a validation rule not a formula field.

Thanks
Swapnil Patne 20Swapnil Patne 20
hi Preya, thank you for your help. Yes that's right- if those picklist values are selected then fields can't be blank
Preya VaishnaviPreya Vaishnavi
Please select my answer as best answer if it worked for you.Thanks