How to add a new row in a table from select dropdown fields on clicking an action button?

I need to update my table to fill fields from select dropdown on pressing an action button (say, Add Row). How can i do that?

1 Like

Depending on the use case and where the data is stored it can be done multiple ways.

You can reference Creating an on row add query or Adding a row via a form document to see cases of implementation for this use case.

1 Like

How to do this in new table component?

Hi @AnsonHwang,

Can you share more about your specific use case and any limitations with the new table? Will the user click a button component to add the new data to your table? If so, you should be able to trigger an update query on button click, similar to what is described in our docs.

My teammate, McKenna also shares an add row via form example on this forum post

Hello, Thanks for your reply. I know to create a new row via Form component, but I think it is a heavy way, we have lots of tables. I want an light option which means need less time to maintain.
Now my workaround is bind the datasource of table to vairiable, then push a new object to datasource in variable when click + button. (the new table component seems not support to change its datasource now)

@AnsonHwang, I've shared this feedback internally! Hopefully we can create a more lightweight option soon :crossed_fingers:

We've added the 'add row' functionality to the new table component (more info here)