
I have a multi-person SharePoint column "InterestedPersons" that I want users to update from a canvas app combo box. By default it should show the names of the people already in the SharePoint field and users should be able to add and remove names at will.
Getting the names already in the "InterestedPersons" field to display in the combo box as defaults is easy, but they don't truly seem to be "selected" as I can't access any of their details to patch back to SharePoint. Only newly selected people work correctly, not the ones already in the list. Therefore the result is the patch adds new people, but clears out the names already in the field since the Email address for those defaulted people are not patched to the Claims column in my collection.
Combo Box Setup:
Items:
Office365Users.SearchUser({searchTerm: Self.SearchText}) //this works
DefaultSelectedItems:
gallery.selected.InterestedPersons //default names display correctly, but don't actually seem to reference the actual records
OnChange:
Clear(InterestedPersonsCollection);
ForAll(ComboBox.SelectedItems,
Collect(InterestedPersonsCollection,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & ThisRecord.Mail, //new items work, defaulted items have blank mail
Department:"",
DisplayName:"",
Email:"",
JobTitle:"",
Picture: "."
}
)
)
Is there a way to accomplish this?