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
JJenkinsJJenkins 

2 part validation rule

I'm trying to create a validation rule that goes "if status = probated, reason field is required"

 

 Here is what I have but when I check syntax it says it is incorrect

 

AND ( ispickval (Status, "Probated")) AND (LEN (Reason) = 0)

 Status is a picklist field and Reason is a text field.

 

Any help is appreciated.

 

thanks 


 

 

Best Answer chosen by Admin (Salesforce Developers) 
Amber NeillAmber Neill

The one thing I see is that you have too many AND's.  Try this instead:

 

AND (( ispickval (Status, "Probated")) , (LEN (Reason)  = 0))

I added parentheses as well.  I didn't check the syntax, so it might still need more work.

Good luck!
Amber

All Answers

Amber NeillAmber Neill

The one thing I see is that you have too many AND's.  Try this instead:

 

AND (( ispickval (Status, "Probated")) , (LEN (Reason)  = 0))

I added parentheses as well.  I didn't check the syntax, so it might still need more work.

Good luck!
Amber

This was selected as the best answer
JJenkinsJJenkins

That works!

 

Thank you