My app is designed to track lead status and progress. On my "Edit" Screen I have 2 Forms.
One submits data to my Lead_Data SharePoint list and is data that should not be easily changed so I have it set to view only when the page is loaded.
The other submits data to my Lead_History SharePoint list and is the main form to edit when you come to this page.
The initial status after the lead is newly created is set to Not Started (this is in my Lead_Data SPL). When the user comes to add a item to the activity tracker area (my Lead_History SPL) I would like it to update the status automatically without having to edit the Lead_Data form to "In Progress".
The below code is what I have come up with so far (see red text), but doesn't work. The first Patch statement works perfectly and as I expect. Suggestions on either how my thinking is wrong or how I can correct my thinking? Thanks!
Patch(Lead_History, Defaults(Lead_History), {Title: "", Note: txt_HistoryDetail.Text, HistoryDate: Text( Now(), "[$-en-US]mm/dd/yyyy hh:mm:ss"), LeadID: Gallery_Dashboard.Selected.ID});
If(Gallery_Dashboard.Selected.Status.Value = "Not Started", Patch(Lead_Data, Gallery_Dashboard.Selected, {Status: '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id: 0, Value: "In Progress"}));