Saving javascript output to DB

Hi,

I’m unable to save a JavascriptToBubble’s value to the DB.

  1. Debugger shows the values are calculated
  2. Debugger shows a new thing is created with the calculated values
  3. For a short notice the calculated values are shown in a table element
  4. When I go to the Database OR refresh the page, the values are all gone.

I have simplified the calculations down to the simplest Workflow without any dynamic values in the Javascript. The issue seems to be revolving around JStoBubble element.

When I click “save” the second time, it saves the values to the DB but now it also created a new thing.

Workflow step1:

Workflow step2:

Debugger showing a successful “Create a new thing” with the right value. Yet DB ends up empty.

I searched the forum, found the same issues without solution…

I suspect the thing is being created before the calculation result is ready.

Debugger can be showing the thing being created with the provided value but it isn’t always true…

Try placing a long pause between or taking the Run Javascript... action to a Custom Event to rule this in/out.

Tried adding a pause, it did not make a difference

Use an event triggered by the JavaScript to bubble element.

1 Like

Thanks, it worked!