+ 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) 
SteveMo__cSteveMo__c

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

SteveMo__cSteveMo__c

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.
SteveMo__cSteveMo__c
That's why they pay me the BIG BUCKS! :smileywink:
jisaacjisaac
and worth every penny! :smileyhappy:
SteveMo__cSteveMo__c
actually it's more like the BIG Pesos, but that's okay the dollar ain't doing so hot lately.