Hi all,
I currently have an edit form which allows users to submit details about themselves and the task they are working on which gets sent to a SharePoint list. When a user clicks the start button the start time is recorded and when the stop button is pressed the end time is recorded.
I have had to put the SubmitForm on the start button rather than the stop button. This is so a record is always recorded when a task is started. If SubmitForm is on the stop button, the user must click stop to record they worked on a task. And if their computer crashes or they forget to click the stop button, the record won't be recorded. So this was my work around.
But. The user might need to add some notes which could take place anytime during the task, so I need the notes field (and also the task time) to be patched to the SharePoint list after the form has been submitted. At the moment I cannot get this to work.
My form looks like this:

OnSelect of start button is: UpdateContext({varStarted: true}); Set(_startTime, Now()); SubmitForm(Form1); Patch(FinanceTimeLog, Form1.LastSubmit, {AgentID: NamePicker.Selected.UserPrincipalName}, {StartTime: _startTime})
OnSelect of stop button is: UpdateContext({varStarted: false}); Set(_endTime, Now()); Set(_duration, DateDiff(_startTime, _endTime, Seconds)); Patch(FinanceTimeLog, Form1.LastSubmit, {TaskTime: _duration}, {Notes: DataCardValue4.Text})
The section is bold is the part which I think isn't working correctly. That information is not being patched to sharepoint. Any help would be much appreciated.
Thanks, Freddie