Add new row to table programmatically

Hi. I'd like to add a new row to a table without using a query. Is this possible, please?

I'd like to add the row to a table, so it can be part of the table1.data array. I have to send the table data as an array, so I can't run the query for each new row.

I tried to use table1.data.push(state1.value) since I'm storing the new row in state1, but this doesn't work

1 Like

Hey @taj – what's your use case here exactly? The table.data property is read-only and does not have a .push method.

A better practice here would be to adjust the data source that the table is pulling from. In your table's "data" property you could use some JavaScript to join the old data and the new data in your temporary state (you could also do this in a Transformer for better reusability). Another thing you could do is use our Query JSON with SQL feature and create some sort of union there.