Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Answered

Form to Submit Multiple Users in a Person Field in SharePoint

(0) ShareShare
ReportReport
Posted on by 15

 I am currently using a PowerApp newform connected to a SharePoint list. I have a Person Field "Addl_Team" on SP that allows multiple entries.

 

I can get my multiselect-enabled combobox in my form to create an entry with multiple people, but if I go back into the app and I decide that I need to add another person to these selections, it overwrites my existing multi-selections with just that one new person I picked.

 

This is the code I have attached to my Update function of my DataCard:

ForAll(DataCardValue15.SelectedItems,
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims: "i:0#.f|membership|" & DataCardValue15.Selected.Mail,
            Department: "",
            DisplayName: DataCardValue15.Selected.DisplayName,
            Email: DataCardValue15.Selected.Mail,
            JobTitle: "",
            Picture: ""
})
  • Verified answer
    Paramesh Ulthi Profile Picture
    Paramesh Ulthi 15 on at
    Form to Submit Multiple Users in a Person Field in SharePoint
    Using a Form to Update Multiple Users in a Person Field in SharePoint
     
    When patching to a Person field, you need to send the whole schema. As you seem to be using the Office365Users.SearchUser function in the Items, this schema is different from that of the person field you are reading from / writing to, so the Update would be
    ForAll(
       DataCardValue15.SelectedItems As _Items,
       {
          Claims: "i:0#.f|membership|" & Lower(_Items.Mail),
          Department: "",
          DisplayName: _Items.DisplayName,
          Email: _Items.Mail,
          JobTitle: "",
          Picture: ""
       }
    )
    and the DefaultSelectedItems
    ForAll(
       ThisItem.Addl_Team As _Items,
       {
          Mail: _Items.Email,
          DisplayName: _Items.DisplayName
       }
    )

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,508

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,839

Leaderboard