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 / Update person field fr...
Power Apps
Answered

Update person field from gallery selections

(0) ShareShare
ReportReport
Posted on by 10

Hi folks,
 
I have built an input form out of a gallery to record interactions with organisations (Gallery is drawing from a sharepoint list called Organisations). In the gallery, if you select a checkbox on an item, it will prompt you to fill out some details for the interactions, and saves the data to another list (list is called Checklist data capture). This is working fine, 
 
What is required (that I can't get my head around) is capturing the user data of the person filling out the form (currently I have a combobox that autofills the current user's profile) and adding that current user to a field in Organisations (called Relationships). 
 
For example, this is what is looks like currently:
 
 
Organisation Name Relationships
Organisation 1 Fred J
Organisation 2 Nina T
Organisation 3 John D
 
Then someone fills out the form:
 
Person picker Combobox1: Jane D
 
Gallery1:
Organisation 1 [checkbox ticked]
Organisation 2 []
Organisation 3 [checkbox ticked]
 
What I want to happen in the sharepoint list:
 
Organisation Name Relationships
Organisation 1 Fred J, Jane D
Organisation 2 Nina T
Organisation 3 John D, Jane D
 
I figure that it requires ForAll, ClearCollect/Collect, and Patching, but I am struggling to figure out the right combination. 
 
Thanks for your help.
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at
    A couple of assumptions here - the Items of ComboBox1 being Choices(ListName.Relationships) - or the output may be different and also that you are using a Classic Check Box (Modern will be .Checked, not .Value)
    Patch(
       Organisations,
       ForAll(
          Filter(
             GalleryName.AllItems,
             CheckboxName.Value
          ) As _Data,
          {
             ID: _Data.ID,
             Relationships: 
             Table(
                _Data.Relationships,
                {
                   Claims: "i:0#.f|membership|" & Lower(ComboBox1.Selected.Email),
                   Department: "",
                   DisplayName: ComboBox1.Selected.DisplayName,
                   Email: ComboBox1.Selected.Email,
                   JobTitle: "",
                   Picture: ""
                }
             )
          }
       )
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard