Hello again,
When I create a new record from a screen with 2 forms, one form is read only and brings in the selected client's name I can save successfully with this syntax:
Patch('Client Workout',If('New workout'.Mode= FormMode.New ,Defaults('Client Workout'),'Edit workout'.Mode= FormMode.Edit, First('Client Workout')),'New workout'.Updates,{Client_x0020_Name:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:Gallery2.Selected.ID, Value:Gallery2.Selected.'Client Name'}});Navigate('Client Profile and List of Workouts', ScreenTransition.None)
When I update this record a new one is created and none of the changes I made are saved with this syntax:
Patch('Client Workout',If('New workout'.Mode= FormMode.New ,Defaults('Client Workout'),'Edit workout'.Mode= FormMode.Edit, First('Client Workout')),'New workout'.Updates,{Client_x0020_Name:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:Gallery2.Selected.ID, Value:Gallery2.Selected.'Client Name'}});Navigate('Client Profile and List of Workouts', ScreenTransition.None)
I am for sure using NewForm mode on the new form and EditForm on the edit form, so I'm not sure I need the If statements.