Update table row

I am trying to query a way to update my rows via a form and whenever I do it updates all of the rows to the same information. How do I prevent this? I want to be able to select a row, have it pop up in a form that way I can update it and see the larger amounts of text in certain rows, and update any information that could be wrong or that I have found out more information for. This is for my workplace to use.


This is the code for my database, each update query is the same but with a correlating number, so ID 1 = update 1, ID 2 = update2 so on and so forth

Can you show how your form is configured? The query looks fine, aside from needing to use {{form2.data.id}} or {{table.selectedRow.id}} as the ID value.

@kschirrmacher is probably on to the fix - make sure you include the unique ID in the form (you can hide the component so it doesn't look editable) or pass the form to a code block that adds the id and then sends results of that code block to the update.

1 Like

What do you mean as the ID value? Does that mean it should be in the changeset Object option? When I put either of those under changeset Object it says that a changeset must be specified


Here is my form configuration

I see now, you have a query for each record in your table. What I meant was that where you have id = 1 in your query, you should have a single query that uses table3.selectedRow.id as that value.

I assume what's happening here is that all of your submit handlers are running on submit and using your form2.data object to update every record in your table. Pare this down to a single query that filters dynamically and I think you'll be set.

Sorry I am still new to this type of coding, I have mainly done HTML and CSS coding in the past, what would that code look like?

1 Like

Exactly as you've got it but instead of id = 1 in the filter field you'll have id = {{table3.selectedRow.id}}. When you select a new row to populate your form it'll also change that reference so that when you submit your form it's pointed only at the record that you were editing.

So now I have this code but it is not updating anything for some reason:


I should have asked earlier, does your table have an id field? If you hover over the {{table3.selectedRow.id}} and have a row selected, what does it say?

It does, these are my table fields:
Table FIelds

And when I hover over it it says the information for whatever the row selected is.

Just the ID or the entire row? There may be something malformed where you need to do {{table3.selectedRow.id.id}} or something.

I'm not really sure what else could be going on here. It worked with the hard coded ID so the form seems to be set up fine. I just replicated it in a sandbox and it worked over here.