Hi all,
I have created an Repeating table in a gallery connected to the collection, the items in the gallery gets patched to a collection with a button outside of the gallery. This is eventually patched to a sharepoint list.
The issue I face is that when I create a delete button inside the gallery item as below, it does not delete the item that I intended it to.
Remove(ServerCollection,ThisItem)
For example, in the image attached, I created 5 items in the repeating table
The items are only saved and patched to the ServerCollection when I click save, and the form is then submitted and all data is patched to Sharepoint.
If i click delete on row 4, it is not guaranteed that row 4 is deleted. while it's pretty random, Mostly row 2 gets deleted first, then 3 etc. If I delete row 1, row 1 is successfully deleted.
Where did I go wrong here? Is it possibly because I have not yet patched items into the collection yet?
How can I ensure that I can delete the correct items in the gallery before patching it?
Thank you!