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 / Updating SharePoint Li...
Power Apps
Answered

Updating SharePoint List item with Email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I'm trying to create new items in SharePoint List.

One of the columns in the SharePoint list is Contact Person. This field type in SharePoint is "Person or Group".

I'm trying to update the list using the following code:

 

Patch('Register',Defaults('Register'),
{'Communication Purpose': CommPurposeTxt.Text},
{'Communication Date':CommDate.SelectedDate},
{'Contact':ApplicantEmailLbl.Text},
)

ApplicantEmailLbl is a label with the value User().Email

 

The error message is attachedError MessageError Message

 
 

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    You cannot patch a Person column by just supplying the email address, you need to provide a full person record to it.

     

    Consider this to replace your Formula:

     

    Patch('Register', Defaults('Register'),
     {'Communication Purpose': CommPurposeTxt.Text,
     'Communication Date':CommDate.SelectedDate,
     'Contact':
     { 
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
     Claims:"i:0#.f|membership|" & Lower(ApplicantEmailLbl.Text), 
     Department:"", 
     DisplayName:ApplicantEmailLbl.Text, 
     Email:ApplicantEmailLbl.Text, 
     JobTitle:".", 
     Picture:"."
     }
     }
    )

     

     

    Also note (to save you time) you do not need to put { } around each column of your record, just to start and end as above.

     

    I hope this is helpful for you.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @RandyHayes 

    That was spot on. I just have one question: 

    Would any of these values be updated in Active Directory?

     

     Department:"", 
     DisplayName:ApplicantEmailLbl.Text, 
     Email:ApplicantEmailLbl.Text, 
     JobTitle:".", 
     Picture:"."
     }

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    No, the user object in SharePoint is not Active Directory.  SharePoint has always had its own user and group information, and the records for that are stored in that format in SharePoint.

    SharePoint, however will derive that "empty" values it needs from ActiveDirectory (if the user is "new" to SharePoint) and from their User object in SharePoint (if they have already access SharePoint before).

    In order to "trigger" SharePoint to "fill in the blanks", you have to supply at least the Claims, DisplayName and Email with values and the rest can be "dummy" values.

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 936

#2
Valantis Profile Picture

Valantis 604

#3
11manish Profile Picture

11manish 518

Last 30 days Overall leaderboard