You need to sign in to do that
Don't have an account?

Workflow rule problem
Hi, I need to do a workflow (or validation rule I'm not sure which one to use) and it should do this "Setup status can be saved as "Cancelled" only if prior value has been "In delivery".
But when I do it like this the first Error goes : Extra " , " then when I take it off it says "Extra Pickval"
AND(ISCHANGED(Setup_Status__c), "Cancelled"),
ISPICKVAL(PRIORVALUE(Setup_Status__c), "In Delivery"))
What would be a better solution for this?
But when I do it like this the first Error goes : Extra " , " then when I take it off it says "Extra Pickval"
AND(ISCHANGED(Setup_Status__c), "Cancelled"),
ISPICKVAL(PRIORVALUE(Setup_Status__c), "In Delivery"))
What would be a better solution for this?
ND(ISCHANGED(Setup_Status__c), ISPICKVAL(Setup_Status__c, "Cancelled"), NOT(ISPICKVAL(PRIORVALUE(Setup_Status__c), "In Delivery")))
All Answers
AND(ISCHANGED(Setup_Status__c), ISPICKVAL(Setup_Status__c, "Cancelled"), NOT(PRIORVALUE(Setup_Status__c) = "In Delivery")
If a user tries to save the record and this criteria evaluates to true, an error message will be displayed. It will evaluate to true if Setup Status is equal to "Cancelled" and the previous value of Setup Status was not equal to "In Delivery". Furthermore, it also checks if Setup Status was actually changed in this update, since if it was not, I assume you don't need to run the validation (if you do, you can remove the ISCHANGED() part).
ND(ISCHANGED(Setup_Status__c), ISPICKVAL(Setup_Status__c, "Cancelled"), NOT(ISPICKVAL(PRIORVALUE(Setup_Status__c), "In Delivery")))