Skip to main content

Notifications

Community site session details

Community site session details

Session Id : m0H2ZhNbnlqSdB5usHlU3c
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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started