Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Patch function error when patching person display name when 2 people have the same First and last names but different email id's

(0) ShareShare
ReportReport
Posted on by

Hello Community,

I have defined a person column in the SharePoint, I have used the Combo to pull the names from Microsoft365 employee names 

when I search with employee name Jon hernandez, the Combo box is showing 2 suggestions for Jon Hernandez(Their emails are like Jon.her@xyz.com,Jon.her-1@xyz.com ) when I click on save it is throwing the below error.

Error
Network error when using Patch function: The requested operation is invalid.

when I use a different name if the combo box give a single suggested name it is saving perfectly.


This is my Patch Function:

Patch(
        'THKL-MasterFile',
        ForAll(
            Gallery2.AllItems,
            {
                EmployeeName: {
                    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                    Claims: "i:0#.f|membership|" & EmployeeNameCard.Selected.DisplayName,
                    Department: "",
                    DisplayName: EmployeeNameCard.Selected.DisplayName,
                    Email: EmployeeNameCard.Selected.Mail,
                    JobTitle: "",
                    Picture: ""
                },


Can someone please help with this.

Thanks in advance.

Categories:
  • v-jefferni Profile Picture
    on at
    Re: Patch function error when patching person display name when 2 people have the same First and last names but different email id's

    Hi @Harika_1 ,

     

    Maybe you can also try below:

    Patch(
     'TC-MasterFile',
     ForAll(
     Gallery2.AllItems,
     {
     EmployeeName: {
     Claims: "i:0#.f|membership|" & EmployeeNameCard.Selected.Mail,
     Department: "",
     DisplayName: "",
     Email: EmployeeNameCard.Selected.Mail,
     JobTitle: "",
     Picture: ""
     },
     }
     )
    )

     

    Best regards,

  • v-jefferni Profile Picture
    on at
    Re: Patch function error when patching person display name when 2 people have the same First and last names but different email id's

    Hi @Harika_1 ,

     

    If the person column in SP list doesn't allow multiple selections, the Combo box in your App should not allow either.

     

    Best regards,

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,594 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard