Skip to main content

Notifications

Community site session details

Community site session details

Session Id : SqSsRvSG7jNIZc7m9CWQg6
Power Apps - Building Power Apps
Answered

How to Clear (not reset) Combobox SELECTED value

Like (1) ShareShare
ReportReport
Posted on 26 Jan 2023 13:12:04 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

  • Verified answer
    GabrielN Profile Picture
    92 on 27 Jan 2023 at 08:29:43
    Re: How to Clear (not reset) Combobox SELECTED value

    This clears the selected item from Department combobox:

    Site combobox / OnSelect event:

    Reset([@Edit_Department_Value]);

     

  • GabrielN Profile Picture
    92 on 26 Jan 2023 at 15:24:54
    Re: How to Clear (not reset) Combobox SELECTED value

    @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

     

  • PatilChetan Profile Picture
    126 on 26 Jan 2023 at 14:26:38
    Re: How to Clear (not reset) Combobox SELECTED value

    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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 250 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 122

#3
stampcoin Profile Picture

stampcoin 108

Overall leaderboard
Loading started