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

Question

Question

Workflow condition not producing correct result

asked on August 5, 2016

I have a condition in my workflow that I am expecting to return true, but it is returning false.  Was hoping someone can tell me what I am doing wrong.

 

The objective of this workflow is to determine if there are any gaps in the Voucher Reference Numbers within a folder.

Here is a part of the workflow...

 

 

The Voucher Reference Number is a string so the first thing I do is convert it to a number.  The first activity looks like this...

Notice I am defining the token as a Number.

The last activity in the list is assigning the converted Voucher Reference Number to another token so it can be used in the next iteration.

Here is that activity...

The condition is comparing the converted Voucher Reference Number to the previous Voucher Reference Number to make sure it is one higher.

The example below shows the previous Voucher Reference Number is 49983 and the current Voucher Reference Number is 549050.  I would expect the condition to be true but it is not...

Here is the activity condition...

And here is what it looks like when it is run...

What am I doing wrong?

0 0

Replies

replied on August 5, 2016

Condition evaluation does not do calculations. So it is literally expecting the value to be "49983 + 1". You have to calculate it first with a Token Calculator activity and use the new value in the condition.

0 0
replied on August 5, 2016 Show version history

If that is the case then the condition should be true for every iteration.  Why does it evaluate to false since they are clearly not equal

2 0
replied on August 5, 2016

We have been burned by this before. Miruna's suggestion should work, but the behavior is pretty darn confusing for the reason you mentioned.

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

Sign in to reply to this post.