I am using MultiSelect Option Set attributes introduced in Dynamics versions 9.
In Dynamics itself and Dynamics forms there are no issues with selecting none of the Multiselect options or changing them to none selected.
However, in PowerApps, using a standard "Form screen" and "Fields" with automatically generated data cards for the Multiselect Option Set attributes and "SubmitForm", selecting none of the options yields
"Edm Object passed should have the options selected"
Question:
- Does Multiselect Option Set (in Dynamics) officially support "none selected"?
- If yes, is my observed behaviour a bug/missing feature in PowerApps?
Currently I have to use workarounds similar to:
UpdateContext({
MultiselectEmpty: (CountRows(ComboBoxInput.SelectedItems) > 0),
OldId: SelectedItem.id
});
Patch(
DataSource,
If(NewItem || MultiselectEmpty, Blank(), OldId),
{ key: value, … },
If(!MultiselectEmpty, {_multiselect_attribute_label: ComboBoxInput.SelectedItems}, {})
);
If(!NewItem && MultiselectEmpty, Remove(DataSource, {id: OldId}))