I'm trying to patch a multi-person column to a collection and then to Sharepoint from a combo box, but I can't get it right. I'm able to patch a single row. My issue now is how to patch multiple rows at once. This is what I have now:
ForAll(
Filter(
gal_NewBudget_4.AllItems,
tog_NewBudget_isChanged_2.Value
) As NewUnitRows,
Patch(colAdminUnits,
Defaults(colAdminUnits), {
ID: NewUnitRows.ID,
Title: NewUnitRows.txt_AdminUnits_Unit.Text,
Department: NewUnitRows.txt_AdminUnits_Dept.Text,
UnitHead: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & NewUnitRows.cmb_AdminUnits_UnitHead.Selected.DisplayName,
Department: "",
DisplayName: NewUnitRows.cmb_AdminUnits_UnitHead.Selected.DisplayName,
Email: NewUnitRows.cmb_AdminUnits_UnitHead.Selected.DisplayName,
JobTitle: "",
Picture: ""},
DepartmentHead: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & NewUnitRows.cmb_AdminUnits_DeptHead.Selected.DisplayName,
Department: "",
DisplayName: NewUnitRows.cmb_AdminUnits_DeptHead.Selected.DisplayName,
Email: NewUnitRows.cmb_AdminUnits_DeptHead.Selected.DisplayName,
JobTitle: "",
Picture: ""},
Members: ForAll(cmb_AdminUnits_PVInitiator.SelectedItems, Collect(colMem, {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & ThisRecord.DisplayName,
Department: "",
DisplayName: ThisRecord.DisplayName,
Email: ThisRecord.DisplayName,
JobTitle: "",
Picture: ""
}))
})
);
My issue is with the members' column. I'm not exactly sure how to handle it. Any help will be appreciated.