Issues updating record from a table

Hi im struggling with an app, my app have a table

i need to enable edit all cells, so if i try to edit one of them, its not saving anything to db.

I tried using {{tabla_observaciones.changesetArray}} but not working, as i need to update a field named User with current_user from retool and others field in addition to the changed cell. Not sure if i explained my self.

i have tried this too


let data =  {{tabla_observaciones.changesetArray}}
let id = {{tabla_observaciones.selectedRow.id}}
let fecha_actualiza = {{ moment.tz("America/Panama").format() }}

return data.map(row => {
  return Object.assign(row, {
    'id': id,
    "fecha_actualiza": fecha_actualiza,    
  })
})

a transformer but im getting this error

update "tbl_observaciones" set "0" = $1 where "id" = $2 returning * - column "0" of relation "tbl_observaciones" does not exist

the idea is to update the changed cells on table plus adding a few more columns (update date)

Not sure what im missing? any ideas? @PatrickMast @Tess @victoria @ScottR

thank you

Are you only trying to update one record or any record in the table?
Using Bulk update in the GUI should work.
What does the changeSetArray look like when you hover over it after editing a few cells in the table?

2 Likes

all records any of them, yeah that was the issue i was not using bulk update, now it works perfect. Thank you

2 Likes