You need to sign in to do that
Don't have an account?
adampro
Preventing Status (picklist) from being changed from certain value
Hi,
I'm trying to create a validation rule to prevent the Status (which is a picklist field) from being changed once it's set to "Closed". I tried:
PRIORVALUE( Status__c) = "Completed"
but apparently I can't compare the picklist value to a string like that. I also thought about using ISPICKVAL() but that takes in a field, not an actual value like PRIORVALUE would return.
Any suggestions?
You nearly had it, but you still have to use ISPICKVAL.
Doesn't ISPICKVAL() take in a picklist field, not a picklist value though?
PRIORVALUE returns the same data type as the original field type, not a string. For example, PRIORVALUE returns a number value when used on a numeric field, and returns a date value when used on a date field. Thus, it will return a "picklist value" when used on a picklist field, which ISPICKVAL can use.