Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

Autopopulate a field based on a checkbox selection

Hello! I’m fairly new to PowerApps.  I’m building a Sharepoint form from a list. I was able to convert a combobox to checkboxes and was able to keep multiple checkbox entries by using a Gallery.  Works great. The checked items come from a column named Servers in a Sharepoint list which has another column called Programs. How do I create a field that will autofill the Programs that are associated to what was picked in the Checkboxes.

Below is the code I used for the Checkbox Gallery.

Gallery1 Checkbox-   

Oncheck-  Collect(colCheckedArea, {Title:ThisItem.Value})

OnUncheck-   RemoveIf(colCheckedArea, Title=ThisItem.Value)

In the combobox item named DDServer – DefaultSelectedItems -  RenameColumns(colCheckedArea, "Title", "Value")


Attached is the idea of what I need.


Any suggestions will be awesome and please let me know if you need more info. 


Thank you very much!


Community Support
Community Support

Hi @Timm1 ,


Do you want to fill the Programs Combo box with programs corresponding to those selected servers? 


If so, you will only need to use a Filter to get corresponding programs of selected servers:

Distinct(Filter(SPlist, Servers in colCheckedArea.Value), Programs).Result

Distinct function is for distinguishing filtered program values if there would be. This formula should be put in the DefaultSelectedItems.


Hope this helps.


Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.


Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Thank you so much.  I'm not getting the results but will play around with it and will let you know if I get it to work.

Hi there.  With me not understanding code, I might not be inputting the correct code.    I have a combo box with the code, Distinct(Filter('Server Names',Servers in colCheckedArea.value), Programs).Result in the DefaultSelectedItems.  I have tried different combinations but nothing works.  sorry - I'm confused on how this all works.  But I'm learning.. 🙂

Thank you

Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,372)