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!
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:
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:
Best regards,
WarrenBelz
42
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36