I have a value that adds +1 to a field each time the workflow is run.
It works, the only issue is that it lags by 1.
When the workflow is run the first time, it doesn’t display any value, however, when it’s run the second time, it shows 1.
A third time it shows 2, etc.
Please how can I rectify this?
Hi there, @Buddha… I’m not sure why the value would be lagging by 1, but here’s a quick question… are you making changes in step 2 to the thing that is created in step 1? If so, you should change the Thing to change in step 2 to be the result of step 1 (instead of doing a search for a thing). I have no idea if that is causing the issue you described, but it’s still the right thing to do. After that, you should run the workflow in step-by-step mode to see if the debugger can help you understand why the value is incorrect the first time you run the workflow.
You’re a genius man. That solved it. Thanks!
Why does that happen?
It could have been an order of operations issue, and by using the result of step 1 in step 2, you are forcing step 2 to wait until step 1 is complete before step 2 runs.