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
ArtWArtW 

Selecting A Specific Pickist Value Requires Text Field Data Entry ...

I have a custom picklist field with 6 different values. I need to validate that if one of the values from this picklist (let's say value #5) is selected, the record can not be saved without my text field named conclusion__c, having data in it.

 

ie, If Picklist Staus = Case Closed, Conclusion <0

 

What if precisely 2 of the 6 values  required data entry. What would the slight tweak be to that very same validation rule?

 

Thanks in advance for your time/help

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Steve :-/Steve :-/

Here you go

 

AND( 
OR( 
ISPICKVAL(Picklist_Field, "Option-1"), 
ISPICKVAL(Picklist_Field, "Option-2")), 
LEN( Text_Field__c) < 1)

 

 

 

 

PS.  You owe me a beer! 

http://beeradvocate.com/beer/profile/863/7971/

 

All Answers

ArtWArtW

To be more specific.

 

The Picklist is a Standard Field. The piclist value is Researched and Closed.

Steve :-/Steve :-/

Here you go

 

AND( 
OR( 
ISPICKVAL(Picklist_Field, "Option-1"), 
ISPICKVAL(Picklist_Field, "Option-2")), 
LEN( Text_Field__c) < 1)

 

 

 

 

PS.  You owe me a beer! 

http://beeradvocate.com/beer/profile/863/7971/

 

This was selected as the best answer
ArtWArtW

Thank you .... how can i get a beer or two to you?

Steve :-/Steve :-/

If you're gonna be at DreamForce '10 you can by me a Pliny at The Rickhouse

ArtWArtW

I know its early to make this commit, but count on it.