Javascript does not compute on first submit, but only from second one

Hi -

I am using toolbox to compute value. My workflow is:

The first javascript is a simple toolbox computation that gets shown properly on the page in a text box, but the value will only be captured in the DB only after the second submit whilst staying on the page. If I navigate away and come back to the page, the first submit never seem to trigger the javascript.

is there a way to work around this ?

Thanks

DB entries below:

What may be happening is the value is being published after the workflow is ran. Try splitting the workflow into two separate workflows.

On your javascript to bubble element, check the trigger event checkbox. Add a new workflow for when a javascript to bubble event is triggered. In that workflow do your save to database action.

This will ensure the code is ran before the workflow is triggered.

Works like a charm. Many thanks Tim12333 -

This topic was automatically closed after 70 days. New replies are no longer allowed.