SQL Error when trying to update a SQL Server row

HI everyone!

I’m having a bad time with this issue…

I followed Appsheet recommendations about Indentity Keys and UniqueIDs to have the “best of both worlds”

When I add a record, everythings works fine…

But, when I try to update a record, Appsheet send me this error:


Identity field on Appsheet is set to non updatable nor required, just “show”

UniqueID field is the key to reference everything else.

I don’t understand why Appsheet is trying to edit the identity column when it’s set only to be read, with no formula, no initial value… nothing…

Have this issue with 2 main tables…

Is there’s something missing on my side or, Appsheet’s post procedures are not accurate.

Hope anyone can clarify this for me.

Thanks in advance

As far as I now, AppSheet updates entire rows at a time, not individual fields. Therefore, AppSheet must be able to read and write all fields. Though it occurs to me this may not be the case for AppSheet columns with Editable? set to OFF. If your identity key column is not set as such, you might try that.

Where did you get those recommendations?

Why do you need an independent “identity key”? You’re trying to work against AppSheet itself, which is not a good idea.

Thanks for your reply Steve:

let me explain:

Primary identity key already exists on my DB, and I cannot change or get rid of it…
As far as I read, Appsheet can handle 1 by 1 sequential identity column behavior, but for offline usage and multiuser environment suggests (maybe suggestion is the term that I’ve should have use, not recommendation) to change to a nvarchar type field, remove the identity setup or edit the initial seed, etc… Based on the below guidelines:

So, what I did is to create an extra text column to set up as UniqueID on Appsheet. And let my DB handle the real primary key.
What I’ve expected is to use the DB primary identitiy key as reference, and let the extra text column to work as the Appsheet’s primary key in the table.

This is how the column is set on Appsheet:

Just retrieve the value of the column, and that’s it…

So, what I understand is, Appsheet rewrites the entire row based on the current selection?
That’s the actual behavior?

Please confirm in order to think of an alternative to deal with this situation.

Thank you

I don’t see evidence you’ve done this:


That’s my understanding, though my experience with a database backend is next to zero. If the app column has Editable? set to OFF, I would think AppSheet may not try to write that column’s value, but I’m not sure of that. I’m confident, though, that AppSheet will write all other fields to ensure data integrity.

That’s the point Steve…

I really don’t wanna mess up my structure, and, it’s weird that Appsheet still wants to update something that I set up not to be updated.

Based on the fact that my identity column was set to non updatable on Appsheet, why trying to update that value?

That’s my opinion, but I get the error anyway…