"Add a new row to another table..." updates instead of creating

I’m using an “Add a new row to another table…” action to create a entry in a subtable. But its updating the existing record instead of creating a new one. Is this a new bug or something?

0 8 534
8 REPLIES 8

recently APIs of Appsheet was bit unstable, I have been in touch with Appsheet dev team for almost month. Action to add new records might have connection with APIs, better to raise ticket to support@appsheet.com

I haven’t noticed this. Perhaps you should write to support@appsheet.com.

@tsuji_koichi & @Kirk_Masden I’ve emailed support with the issue. Thanks for your help

If you attempt to add a record with the same key as existing record, the add will automatically be turned into an update. You can confirm whether this is happening by checking “Add” end record in the Audit History. If the “Add” end Audit History record contains the property “UpdateExistingRecord” and the key value of the updated record, then the “Add” was turned into an “Update”.

This is by design as part of the “last writer wins” conflict resolution strategy. If two users attempt to “Add” the same record, the first “Add” to reach the server is treated as an “Add”. The second “Add” to reach the server is treated as an “Update”. To signal that this has occurred, we set the “UpdateExistingRecord” property in the Audit History for the second add.

I am not certain that is what you are reporting here, but it sounds like it might be.

@Phil ok, I’ll check it out. I thought I’d set the key column to unique ID…

Hi,
Can this be considered a feature?
I will have instances where columns will need to be set based n an action. But I don’t know if it will be an update to a row or if the row will need to be created.
Can I use ADD and expect that if the row exists it will be coverted to an Update?

Hi Penny,

If you Add a record to a table and specify a key value that matches the key of an existing record in that table, then AppSheet will definitely turn the Add into an Update. The field values from the Added record are copied into the existing record. This is the result of our “last writer wins” conflict resolution strategy described above.

You can rely on that behavior. We have considered adding richer conflict resolution strategies in future, but we if we do that we must provide an option to preserve the current behavior. That is essential to maintain backward compatibility for existing customers who rely on this behavior…

Thank you

Top Labels in this Space