I am creating an onboarding/offboarding application for our IT department. In the app I have a gallery and edit form whose datasource is connected to a collection (colITAssets). This collection is created from a SharePoint List 'IT Team' using Collect(colITAssets, 'IT Team')
In the edit form I am pulling in data into a multi select combobox from MSGraph custom connector. One of the combo boxes is Licenses. The OnSelect property is ClearCollect(LicenseGroups,MSGraphAzureADLicensingGrps.GetLicenseGroups().value.displayName); and the Items property is SortByColumns(LicenseGroups,"displayName"). This pulls in the data in to the combo box correctly.
The problem I'm having is selecting and deselecting Items from the combobox and patching the correct information back to the collection and/or list. Here is my patch statement in the OnSelect property of a Button:
Patch(
colITAssets,
LookUp(colITAssets, EmpID = glrITTeam.Selected.EmpID),
{
Hardware: dc_Hardware.SelectedItems,
Licenses: ForAll(dc_License.SelectedItems,{Value: "",'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}),
}
);
When using this statement, any time I click on the button the items disappear from the gallery. I can use
License: Collect(colUserLicense,ForAll(dc_License.SelectedItems,[Value: "",'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"})),});
and save the data to a collection and this seems to work to keep the button from removing the data from the gallery, but It's updating the gallery/collection that seems to stump me. If anyone can help with the correct formula to patch the collection correctly, I can figure out how to update the SharePoint list. Any suggestions would be greatly appreciated. Thanks.

Report
All responses (
Answers (