I have this formula inside a Form OnSuccess property, to get all the items from SharePoint, and if they are not represented in the Combo Box selected items to remove them:-
ClearCollect(
colcurrentPackageNetworks,
Filter(
'Package Networks',
'Package ID' = PackagesForm.LastSubmit.ID
)
);
ForAll(
colcurrentPackageNetworks As c,
If(
IsEmpty(
Filter(
PackageNetworksComboBox.SelectedItems,
ID = c.'Network ID'
)
),
Notify(
c.ID,
NotificationType.Error
);
Remove(
'Package Networks',
First(Filter(
'Package Networks',
'Network ID' = c.'Network ID' And 'Package ID' = PackagesForm.LastSubmit.ID
))
),
false
);
);
Clear(colcurrentPackageNetworks);
ClearCollect(
colSelectedPackageNetworks,
PackageNetworksComboBox.SelectedItems
);
ForAll(
colSelectedPackageNetworks As c2,
If(
IsEmpty(
Filter(
'Package Networks',
'Package ID' = PackagesForm.LastSubmit.ID And 'Network ID' = c2.ID
)
),
Notify(
c2.ID,
NotificationType.Success
);
Patch(
'Package Networks',
Defaults('Package Networks'),
{
'Package ID': PackagesForm.LastSubmit.ID,
'Network ID': c2.ID,
NetworkTitleSync: LookUp(
Networks,
ID = c2.ID
).Title
}
),
false
);
);
Clear(colSelectedPackageNetworks);
Navigate('Packages List');
Notify(
varConfirmationMessage,
NotificationType.Success
);
then to get all the selected combobx items and add them.. now if i remove all the options from the combox, still one item will be added to sharepoint, what could be the issue?
Thanks

Report
All responses (
Answers (