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

Question

Question

Calculation in form field not working after table rows are altered via Workflow

asked on December 19, 2022 Show version history

I have a Forms table that is filled via Workflow and a single line field outside the table that sums up the number of rows that resulted.  That single line field that sums up the rows is correct on the first try, but if there are any changes it is not always redoing the sum correctly.

This stage of the form design loops back to restart the workflows if a radio button is on No (no, retry) when the form is submitted, which causes the process to loop back to the workflows and re-do the table list.

This is where I'm running into trouble.  The single line field that sums up how many rows in the table is correct the first time, but not always summing up correctly if the form loops back to run the workflows again.

Is there a way to force the sum to redo the sum calculation?

0 0

Replies

replied on December 19, 2022

That depends, the Calculations use JavaScript and basically only run within the open web form.

As a result, if you change a value in the table via Workflow, and there's no User Task afterward, the calculations will never come back into play.

If you don't have user tasks after the workflows in which you can re-trigger the calculations, then you will need to perform the calculations in Workflow and update the values there.

2 0
replied on December 19, 2022

I think I've resolved the issue.  I added a radio button with Yes/No for recalculate (only on the Workflow Check stage of the process) where if the recalculate is necessary, click Yes and another number field is unhidden and it runs the calculation again.  That way, the person doing the workflow check can verify the right number of lines in the table, correct the number field that the next user will see, and send the form on to the next person's stage.  Seems to do the trick for now.

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

Sign in to reply to this post.