+ Start a Discussion
Marc Mastrocola 9Marc Mastrocola 9 

Workflow Rule Criteria = Run only when a number field increases

Hi guys,

We have a number field on the opportunity page that counts the number of products that the opportunity has and I'm trying to figure out how to run a workflow rule only when that number field increases in value.

For example, if the opportunity goes from having 1 product to 2 products or from 3 products to 5 products, it should run.

Is there a way to do this?

Thanks!
-Marc


Best Answer chosen by Marc Mastrocola 9
sbbsbb
Make sure the workflow rule evaluation criteria is set to: "created, and every time it’s edited"

All Answers

sbbsbb
Check the PRIORVALUE formula. If the current value is higher than the priorvalue of that field, your rule should fire.
Marc Mastrocola 9Marc Mastrocola 9

Thanks for the quick reply, however when I try to use that function in a workflow rule I get the following error:

 

"Function PRIORVALUE may not be used in this type of formula"

Here is my code:

of_Products__c >(PRIORVALUE(of_Products__c))

sbbsbb
Make sure the workflow rule evaluation criteria is set to: "created, and every time it’s edited"
This was selected as the best answer
Marc Mastrocola 9Marc Mastrocola 9
Was able to figure it out the problem. You can only have the evaluation criteria set to "Evaluate the rule when a record is created, and every time it's edited".
sbbsbb
Good! Could you please mark the question resolved?