Hey. @matt.cunnington!
You can have your table trigger two separate GUI update queries on save that correspond with each of your tables. Instead of passing the full changesetArray
to each of the queries you can use lodash's _.pick
function to select the columns that exist in each of the respective tables, e.g.
{{table2.changesetArray.map(row => _.pick(row, ["invoice_id",'status_id']))}}
in one, and
{{table2.changesetArray.map(row => _.pick(row, ["product_type","town_name"]))}}
in the other.
Since you're triggering two separate queries it can be helpful to combine the two in a JavaScript query so that you can trigger the data source for your table when both are complete. Something like:
With that you'd just need to add the JavaScript query as the save handler on your table.
Can you let me know if that works?
\