Hi, I'm trying to insert multiple rows into the database using a table component (table_entry
) in Retool.
Here’s what I’m doing:
- I generate empty rows in the table for user input (e.g., with null values).
- After the user fills in the rows, I want to retrieve the entered data and insert all rows at once.
- I use a temporary variable (
table_data_var
) initialized as an empty array to manage the data.
To debug, I added the following logs:
console.log("table", table_entry.recordUpdates);
console.log("table", table_entry.data);
console.log("var", table_data_var.value);
But here’s the problem:
recordUpdates
returnsundefined
table_entry.data
andtable_data_var.value
returnnull
or empty
So I'm not able to capture any of the entered data, and I can't proceed with the insert query.
How can I properly capture the data entered in the table so I can insert multiple rows?
Is there a better way to sync the input table with a variable or trigger the save?
Any help is appreciated!