web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Autopopulate a field b...
Power Apps
Unanswered

Autopopulate a field based on a checkbox selection

(0) ShareShare
ReportReport
Posted on by 301

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!

Tim

PAServer.jpg
Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    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.

     

  • Timm1 Profile Picture
    301 on at

    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.

  • Timm1 Profile Picture
    301 on at

    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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard