I have created a form that takes some input.
It kicks off a Javascript query that does stuff with the input.
At the end of that JS, I want to write resulting data into a currently selected row in a Google Sheets table - specifically update column4, column5, and column9.
What is the correct JS syntax to do this?
Or, should some data be passed to a second GSheets query for this update?
To answer your question more directly - a table is just a frontend representation of your data, so you need to update the underlying resource that’s powering your table. If it’s Google Sheets, you’ll want to create a query, choose “update your spreadsheet” from the dropdown, and fill in the requisite details. We have a tutorial for Google Sheets specifically here.
In terms of ordering, you can configure your new GSheets query to run after the JS query you’ve triggered - click on your JS query, scroll down to the “after this query runs” section, and choose your GSheets query in the “on success trigger” field. If you have a GSheets query that’s populating your table, you’ll probably also want to rerun that once the update is made.
JavaScript Query runs, manipulates some data, triggers other queries, completes (successfully)
On successful completion JavaScript Query triggers a Google Sheets Update query, passing in the data needed to identify the row, columns, and updated values for those columns
Google Sheets Update query runs, updating the Google Sheet with passed values
Google Sheets read query reruns to get newly updated data