web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Clear (not rese...
Power Apps
Unanswered

How to Clear (not reset) Combobox SELECTED value

(1) ShareShare
ReportReport
Posted on by 92

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

Categories:
I have the same question (0)
  • PatilChetan Profile Picture
    126 on at

    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

  • GabrielN Profile Picture
    92 on at

    @PatilChetan ,

    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.

    GabrielN_0-1674746643333.png

     

  • Verified answer
    GabrielN Profile Picture
    92 on at

    This clears the selected item from Department combobox:

    Site combobox / OnSelect event:

    Reset([@Edit_Department_Value]);

     

  • Suggested answer
    nareshkun Profile Picture
    2 on at
     the above answer clears the control visually but will not save the empty value on save of an edit form.. So  amending the formula in the Update property of the data card  worked for me in edit form,   instead of blank or {} ..use 
    {
          '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
           Id:-1,
           Value:""
       }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard