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:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,781 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

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

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard