Trouble Inserting New Record into freight_forwarder Table via GUI Insert

Hi everyone :wave:,

I'm trying to use the Retool GUI mode to insert a new row into my freight_forwarder table using editable rows in a Table component. Here's what I’ve done:

Resource: Retool Database
Action Type: Insert a record
Changeset (Object): {{ freightForwarderTable.newRows }}
I get a "success" message, but nothing is actually inserted — I’ve checked both:

  • The Table component in Retool
  • The actual database directly
  • The table is editable, and I’m adding new rows via the + button.
  • But the new row does not show up in the DB, and no error is returned.

    It would be great if someone, can help me with this!
    Thanks in advance!

Hello @parnian94,

That is odd there isn't an error message, but the new row isn't appearing in the DB table.

Thank you for sharing the scree shot! It looks like you may need to key into the value from the changeset as .newRows returns an array. But {{freightForwarderTable.newRow[0}} should evaluate to the row object and hopefully work!

Test that out and if you get an error related to the id, make sure you have auto incrementing for the table ID as that can cause some trickiness but I can help with that if needed :crossed_fingers:

Hello @Jack_T thanks for your help. unfortunately your provided solution is not working, and I see "undefined input" message.


Could you please help me with the auto incrementing for the table ID? his is the Id column in retool database :

and here is how Id field looks like in the retool table:

Thanks for you support!

Hi @parnian94,

From your screenshot, it looks like you are using a form to upload the data from the user to the table.

Therefore you should change the Changeset Object to be {{formName.data}} with the name of the form component you are entering data into.

Table.newRow is for when you are using a table's built in 'new row' functionality, so that would explain why it is undefined :sweat_smile:

For auto incrementing the ID, this is a setting that can be selected when you first click on creating a new table. It should auto populate with the first column being a primary key ID with this setting selected by default.

Also, when creating the form, once you click on "Generate from table" it will give you a preview of the form schema.

Make sure to deselect the ID field. This will ensure that the auto-incrementing that is turned on for the Retool DB table will work and that the user does not enter in an ID that is already being used, or mess up the ID order :sweat_smile: