Hi. I'm trying to update my Sharepoint list (Inventory) from a collection (CheckedRows). The column I want to update is a checkbox column and is called Location Verified. The collection, CheckedRows, has two columns: Location Verified and Title (which is the column 'Asset ID' in the SharePoint list).
I have a gallery with a checkbox. If the checkboxes are ticked, the record shows up in the collection as 'true', as well as the Asset ID in the 'Title' column.
The SharePoint list has a column called 'Location Verified' which are all checked to start with.
In my PowerApp, I click a button that deselects all the checkboxes. I then re-check all the items that are in the location they're supposed to be in.
What I want is, when I click a 'Submit' button, for the records with unticked boxes to update in the SharePoint list to 'false'.
On the Submit buttons OnSelect, I've tried lots of different things. But the simplest is: Patch(Inventory, CheckedRows).
However, when I run this, I get a big long error message which basically says that it can't patch because 'Asset ID' (the Title column) has duplicate records.
This sounds like it's trying to add records rather than update them. I've tried lots of different suggestions from the internet. What am I doing wrong? Why isn't it updating the existing records?