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
nelle3223nelle3223 

Validation Rule - Picklist Values

Hello,

 

I am trying to come up with a validation rule that the Quote Name Field will only be able to include the names Original, Rebid 1, Rebid 2, etc.  I am not sure what kind of value to use.  Please suggest something.

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
phiberoptikphiberoptik
AND(
    NOT(Name = "Original"),
    NOT(Name = "Rebid 1"),
    NOT(Name = "Rebid 2")
)

 

If the name is not one of these three, an error will display. Just continue to add additional lines to the validation rule if you have Rebid 3, Rebid 4, etc.

 

 

All Answers

phiberoptikphiberoptik
The standard Quote Name field or a custom one you created?
nelle3223nelle3223

Standard Quote Name

phiberoptikphiberoptik

Does the Quote Name need to EQUAL Original, Rebid 1, or Rebid 2, or does it just need to contain the word Original or Rebid?

nelle3223nelle3223

It needs to equal.  I was going to make the field a picklist and of course not able to change the field type, so this is the only way I think I can out something in place. 

phiberoptikphiberoptik
AND(
    NOT(Name = "Original"),
    NOT(Name = "Rebid 1"),
    NOT(Name = "Rebid 2")
)

 

If the name is not one of these three, an error will display. Just continue to add additional lines to the validation rule if you have Rebid 3, Rebid 4, etc.

 

 

This was selected as the best answer