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
jisaacjisaac 

validation rule for empty text field based on picklist value not working

I amtrying to prohibit saving an opportunity when the Agreement Type is an SPO and there is no Peoplesoft Client ID indicated. The Agreement type is a picklist field and the Peoplesoft Client ID field is a text field.

 

I created the formula and received no errors with it as written. problem is, it is not working. I can save my test opp even when it should not let me.

 

What am I missing?

 

Here is my code:

 

AND
(
(PeopleSoft_ID_Number__c = " "),
ISPICKVAL( AgreementType__c , "SPO")
)

 

Thanks,

Jane

 

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

I think you may have to change your evaluation of the PSoft ID field to LEN

 

 

 

AND ( (LEN (PeopleSoft_ID_Number__c) = 0), ISPICKVAL(AgreementType__c , "SPO"))

 

 

All Answers

Steve :-/Steve :-/

I think you may have to change your evaluation of the PSoft ID field to LEN

 

 

 

AND ( (LEN (PeopleSoft_ID_Number__c) = 0), ISPICKVAL(AgreementType__c , "SPO"))

 

 

This was selected as the best answer
jisaacjisaac
Thanks Steve, that worked.
Steve :-/Steve :-/
That's why they pay me the BIG BUCKS! :smileywink:
jisaacjisaac
and worth every penny! :smileyhappy:
Steve :-/Steve :-/
actually it's more like the BIG Pesos, but that's okay the dollar ain't doing so hot lately.