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 / Deselecting checkbox c...
Power Apps
Unanswered

Deselecting checkbox clears selected value in ComboBox

(0) ShareShare
ReportReport
Posted on 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!

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard