*I have 2 different sharepoint lists i need to patch to, customer request. i dont recall why we don't use submit form. We are using the Update and then also patching on specific cards because again, the person who started this did it this way and i'm just supposed to build off of it. It worked great, until they wanted to change options within the EditForm.
I'm trying to write back to a Lookup field.
Patch(
'TESTAction Log',
Defaults('TESTAction Log'),
Form_Upload_1.Updates,
UploadForm_Doc_Details_1.Updates,
Usage_Form_1.Updates,
{SO_Dept:
{
Id: SODeptCombo_2.Selected.ID,
Value: SODeptCombo_2.Selected.Title,
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
},
{SO_Dept_DisplayName:hiddenLabel_SODept_2.Text},
{Doc_Owner_DisplayName: Document_Owner_Value_1.Text},
{DO_Designee_DisplayName: hiddenLabel_DO_Designee_2.Text},
{Dept_Usage:hiddenLabel_allDepts_1.Text},
{System_Usage:hiddenLabel_system_1.Text},
{Role_Usage: hiddenLabel_Roles_2.Text},
{Process_Usage:hiddenLabel_process_1.Text},
{ParentID:lblID_1.Text},
{Title: Working_Doc_Location_Value_1.Text},
{Apply_to_every_page: vareveryPage},
{Doc_Owner:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: DocOwnerPeopleField_1.Selected.Claims,
Department: DocOwnerPeopleField_1.Selected.Department,
DisplayName: DocOwnerPeopleField_1.Selected.DisplayName,
Email: "",
JobTitle: "",
Picture: ""
}
},
{DO_Designee:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: DO_Designee_ComboBox1_1.Selected.Mail,
Department: DO_Designee_ComboBox1_1.Selected.Department,
DisplayName: DO_Designee_ComboBox1_1.Selected.DisplayName,
Email: DO_Designee_ComboBox1_1.Selected.Mail,
JobTitle: "",
Picture: ""
}});
Patch(
'TESTNew Item Only Action Log',
Defaults('TESTNew Item Only Action Log'),
Form_Upload_1.Updates,
UploadForm_Doc_Details_1.Updates,
Usage_Form_1.Updates,
{SO_Dept:
{
Id: SODeptCombo_2.Selected.ID,
Value: SODeptCombo_2.Selected.Title,
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}
},
{SO_Dept_DisplayName:hiddenLabel_SODept_2.Text},
{Doc_Owner_DisplayName: Document_Owner_Value_1.Text},
{DO_Designee_DisplayName: hiddenLabel_DO_Designee_2.Text},
{Dept_Usage:hiddenLabel_allDepts_1.Text},
{System_Usage:hiddenLabel_system_1.Text},
{Role_Usage: hiddenLabel_Roles_2.Text},
{Process_Usage:hiddenLabel_process_1.Text},
{ParentID:lblID_1.Text},
{Title: Working_Doc_Location_Value_1.Text},
{Apply_to_every_page: vareveryPage},
{Doc_Owner:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: DocOwnerPeopleField_1.Selected.Claims,
Department: DocOwnerPeopleField_1.Selected.Department,
DisplayName: DocOwnerPeopleField_1.Selected.DisplayName,
Email: "",
JobTitle: "",
Picture: ""
}
},
{DO_Designee:
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Claims: DO_Designee_ComboBox1_1.Selected.Mail,
Department: DO_Designee_ComboBox1_1.Selected.Department,
DisplayName: DO_Designee_ComboBox1_1.Selected.DisplayName,
Email: DO_Designee_ComboBox1_1.Selected.Mail,
JobTitle: "",
Picture: ""
}}
);
ResetForm(Form_Upload_1);
ResetForm(UploadForm_Doc_Details_1);
ResetForm(Usage_Form_1);
Set(ResetCheckbox,true);
Navigate(Doc_Mgmt_Form, Transition.None)