Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Unable to save to a multi-select People column from a Power Apps form

(1) ShareShare
ReportReport
Posted on by 2
Hi
I have a form in a Power App where one of the fields are connected to a multiselect people column in SharePoint. The form display the people from the SharePoint fields perfectly when the user selects an existing item. When the user clicks the Save-button the SubmitForm command is triggered, which works fine if the form submits a new registration. Unfortunately, when I try to make it submit an update of an existing item, it doesn't save any changes to the item (the form consists of other fields in addition to the multi-select field). I have replaced the combo box which was automatically added when creating the form because it only displayed a number instead of the name of the person. Using a classic combo box instead fixed this problem.
Here are some code snippets from the combobox component:
Items
Office365Users.SearchUser(
    {
        searchTerm: Self.SearchText,
        top: 5
    }
)
DefaultSelectedItems:
Parent.Default
DisplayField:
["DisplayName","Mail"]
 
Parent component (card):
Update: 
ForAll(
    EmailNotificationDaybookCat_ComboBox.SelectedItems,If(!IsBlank(ThisRecord.Mail),
    {        
        Claims: "i:0#.f|membership|" & Lower(ThisRecord.Mail),
        Department: "",
        DisplayName: ThisRecord.DisplayName,
        Email: ThisRecord.Mail,
        JobTitle: "",
        Picture: ""
    })
)
 
The live monitor throws three errors:
Category: Runtime - Operation: submitFormAsync - Result info: "One or more errors has occured"
Category: Function - Operation: Patch - Result info: "Network error whne using Patch function: The requested operation is invalid." and
Category: Network - Operation: Network - Result info: "Bad request" with status 400. 
 
I appreciate any help I can get 🙏.
Categories:
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,580 on at
    Unable to save to a multi-select People column from a Power Apps form
    Try changing the DefaultSelectedItems to
    ForAll(
       ThisItem.YourPersonField As _Data,
       {
          Mail: _Data.Email,
          DisplayName: _Data.DisplayName
       }
    )
    and the Update to
    ForAll(
       Filter(
          EmailNotificationDaybookCat_ComboBox.SelectedItems,
          !IsBlank(Mail)
       ) As _Data,
       {        
          Claims: "i:0#.f|membership|" & Lower(_Data.Mail),
          Department: "",
          DisplayName: _Data.DisplayName,
          Email: _Data.Mail,
          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

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,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard