Dear All,
I have a SharePoint Integrated app. I can not figure out how to clear a selected value of Department combobox by OnSelect function of Site combobox. I solved to clear the default selected items based on OnSelect function of Site combobox:
Site combobox OnSelect:
UpdateContext({varEdit_ClearDepartmentDefault : true});
DataCardValue1.Selected.Value=Blank();
Department combobox DefaultSelectedItems:
If(varEdit_ClearDepartmentDefault=true,[],Parent.Default)
As you can see in the attached gif file, the DefaultSelectedItems cleared as it expected, but the selected item value is not cleared.
Could you help
This clears the selected item from Department combobox:
Site combobox / OnSelect event:
Reset([@Edit_Department_Value]);
thank you for your fast response. Unfortunately there is a syntax error, see the error message on the picture below. On the left side you can find the relevant fileds.
Hello,
To clear the selected value of the Department combobox based on the OnSelect function of the Site combobox, you can use the Clear function. Here is an example of how you could use it in your OnSelect function:
Clear(DepartmentComboBox)
This will remove all selected items from the Department combobox, effectively clearing the selection.
Additionally, you can also set the "DefaultSelectedItems" property of the Department combobox to an empty collection, this will also clear the selected items.
DepartmentComboBox.DefaultSelectedItems = {}
Regards,
Chetan
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional