You are viewing limited content. For full access, please sign in.

Question

Question

almost equals condition (within a few cents)

asked on August 14, 2014

 In workflow I need to be able to compare two dollar amounts, but it is okay if they are off by a few cents how can i match that condition in workflow?

0 0

Answer

SELECTED ANSWER
replied on August 14, 2014 Show version history

I would use one of the conditional activities and token calculator to handle this.

 

Take one value as your pivot amount. Use the token calculator to add and subtract the amount of difference that is acceptable. 

 

Then use the conditions to specify that all must be true.

Set the second value to be less than or equal to the highest calculated value

Set the second value to be greater than or equal to the lowest calculated value.

 

Inside the condition, when it's true, you should set a token value to be modified to true, this you can then use to tell if the value matched or not at a later point of your workflow

 

EDIT:

Alternatively, you can subtract one value from the other, then make sure the value is positive/greater than/equal to 0 and less than .02

0 0

Replies

replied on August 14, 2014

The subtraction worked perfectly, and did exactly what I wanted. Thanks

0 0
replied on August 14, 2014

If you foresee the chance that the amount of variation acceptable may change, you may want to create an "Assign Token Value" activity at the top of your workflow and use that as the value of difference you subtract and add, this way you can easily change that in the future to a new value.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.