+ Start a Discussion
Admin_DudeAdmin_Dude 

If a pick list value in the first field is X, then require a value in the second field

I am working on creating required fields in salesforce for consistent data entry.  I have multiple situations in which I need to validate data with the same scenario, which is If a pick list value in the first field is X, then require a value in the second field.

 

For example, when entering an Account, if the value selected in the Account Type field is pick list is "Prospect", then a value in Prospect Status field is required.

 

Another scenario is: if the if value selected in the Account Type field is pick list is "Prospect", then a value in Market Type field is required.

 

All of the documentation I have read says that I can not make a pick list required if it is dependent on another pick list (unless I am misunderstanding it)....but I have seen it done in other implmentations of Salesforce.  

 

If someone reading this knows how to create this validation formula for this and can provide an example, I would be grateful!

Best Answer chosen by Admin (Salesforce Developers) 
SteveMo__cSteveMo__c

Here you go:

 

AND( ISPICKVAL(Picklist_1, "X"), ( ISPICKVAL(Picklist_2, "")))

 

 So yours would look something like this:

 

 

AND( ISPICKVAL(Type, "Prospect"), ( ISPICKVAL(Market_Type__c, "")))

 

 

 

All Answers

Admin_DudeAdmin_Dude

To be more clear, the scenario should be:

 

If the value selected in the Account Type field in the pick list is "Prospect", then a value in Market Type field is required.

 

There was a type error in the original post

SteveMo__cSteveMo__c

Here you go:

 

AND( ISPICKVAL(Picklist_1, "X"), ( ISPICKVAL(Picklist_2, "")))

 

 So yours would look something like this:

 

 

AND( ISPICKVAL(Type, "Prospect"), ( ISPICKVAL(Market_Type__c, "")))

 

 

 

This was selected as the best answer
Admin_DudeAdmin_Dude

Thank you!!! This formula works perfectly!

 

 

I have one more scenario that you may know how to resolve: 

 

           In an Account, if the pick list value in the Type field="Partner", make the multi-picklist field Type of Partner required.

SteveMo__cSteveMo__c

Here

 

AND( ISPICKVAL(Picklist_Field, "X"), ( ISBLANK( Multi_Picklist_Field)))

 

 

 

 If you're gonna be writing formulas, you should probably read up on these:

 

https://na3.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf

 

https://na3.salesforce.com/help/doc/en/salesforce_useful_validation_formulas.pdf

 

 

Message Edited by Stevemo on 02-27-2010 03:38 PM
Malisa Gibbons 9Malisa Gibbons 9
I am having the same issue.
I am trying to make a custom Pick List Field "Aquisition Type" be a mandatory entry if the field "Type" = "Aquisition".  I have tired some of the examples here but cannot get it to work.