I have created a multiple screen custom form for a SharePoint list. Each screen contains a form. In order to ensure all forms save to the SharePoint list, I have disabled the default save button on the form and created my own "save" button which appears on each form. I have used the patch function, using the formula below:
Set(varRecord, Patch(
'T-O Led Projects',
{ID:SharePointIntegration.SelectedListItemID},
SharePointForm1.Updates,
SharePointForm1_1.Updates,
SharePointForm1_2.Updates,
SharePointForm1_3.Updates,
SharePointForm1_4.Updates,
SharePointForm1_5.Updates));
Navigate('Success Screen');
This seems to work fine when users edit an existing record.
However, when users try to add a new record, and then use this save button, it appears to overwrite the first item in the SharePoint list. When I look at the version history for the record, I can see all the old data being replaced by the new entry.
Why is my custom save button behaving like this?