Hi
I need to run some JavaScript code during a new form entry, but not as a column. I use a two-step workflow (initial form to gather responses and then complete in step 2 with comments). I want to execute JavaScript at the end of step 1 and after completing step 2, but the workflow doesn’t provide this option. Any workarounds?
You could still create the JavaScript column to run the JS you want before submitting, and then use the result from that JS column in your workflow.
But I think I know what you are trying to do… You want to use fetch right?
I’m unclear about something. When you add JavaScript to a column, it runs for each new row in the table, causing all rows to execute again. I can observe that every input row reloads the JavaScript, affecting the app. I haven’t tested it enough (no time to devtools). I’m not using fetch, but rather direct JavaScript and QueryJson, which are similar.
Ok so what would you want to do with the workflow to the layout?
Implement a two-step form entry. Between Step One and Step Two, use JavaScript (fetch) to call additional information. Consider adding an optional step via JavaScript, possibly by creating a single-row extra table.
Will the fetched data always be the same?
Same fetched point but non same var p1 or p2