Table changeset doesn't include row id

I'm using the changesetArray from the table component in a function that handles updating the rows in my DB. Up until recently, each of the changes in the changesetArray used to include the id of the changed row, but for some reason, it's not there anymore?

Was this an internal change at Retool, or was the id never supposed to be available in the changesetArray anyways?

Hey @Janosch_Herrmann,

I hope note, that would mess up 80% of my apps!

Have you checked if your table's primary key hasn't been accidentaly removed in yoru column settings?

Tbh, that was the first thing I checked, and it was there, but now it was indeed removed again. Is it possible that this resets automatically sometimes, possibly when there are two rows in the data with the same id?

Because I was having this issue a couple of times now.

Sometimes if your query returns new columns, it may remove it. But I'm not sure to be honest.

1 Like

Maybe someone from Retool knows this?

1 Like

Do you have a primary key set? If so, the id should be included :thinking:

CleanShot 2024-11-20 at 11.09.06@2x

You can also retrieve all values in the row using Interaction->Advanced settings->Include full rows in changeset array:

Yeah, the problem was that this was somehow being changed automatically from time to time.

Thanks - just to confirm, the primary key setting was being cleared? Has it happened recently?