Skip to main content

Notifications

Community site session details

Community site session details

Session Id : CxvH4dTeJdQlM6RYgDxC6h
Power Apps - Building Power Apps
Answered

Deselecting checkbox clears selected value in ComboBox

Like (0) ShareShare
ReportReport
Posted on 6 Jul 2020 05:57:26 by 16

Hello, 

 

I have a comboBox programmed to grab data from sql. On selection the value(s) selected in the comboBox, populate a gallery that includes a list and each populated item has a checkbox. This is working great, when you deselect a value from the comboBox it dynamically updates the gallery. With the checkbox's I would like it so that when you deselect the checkbox it removes the same selected item from the comboBox. I'm currently using the OnUncheck property and I can use the 'Reset(ComboBox1)' property and it clears my comboBox, however I would like it to only remove the selected Item. So if on the Gallery I remove 'item2' I would like it to only remove 'item2' from the comboBox not reset the whole thing. Is there a function I'm missing that allows you to do this or is there another way to achieve what I want here?

 

Thank you in advance!

  • Verified answer
    v-xida-msft Profile Picture
    on 06 Jul 2020 at 09:12:06
    Re: Deselecting checkbox clears selected value in ComboBox

    Hi @sharpmachine555 ,

    Do you want to remove the selected item from your ComboBox when you uncheck the Checkbox in your Gallery?

     

    Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. As an available solution, I think a collection could achieve your needs.

     

    I have made a test on my side, please take a try with the following workaround:

    11.JPG

     

    12.JPG

     

    13.JPG

    Set the Items property of the ComboBox1 to following:

    ["PowerApps", "Power Automate", "Power BI"]

    Set the OnChange property of the ComboBox1 to following:

    ClearCollect(StoredItems, ComboBox1.SelectedItems.Value)

    Set the DefaultSelectedItems property of the ComboBox1 to following:

    StoredItems

     

    Set the Items property of the Gallery to following:

    ComboBox1.SelectedItems

     

    Add a Checkbox inside the Gallery, set the Default property of the Checkbox to following:

    true

    set the OnUncheck property of the Checkbox to following:

    RemoveIf(StoredItems, Value = ThisItem.Value);
    Reset(ComboBox1)

     

    Please check the following GIF screenshot for more details:

    Test.gif

     

    Best regards,

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 > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 42 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started