web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Saving data from power...
Power Apps
Unanswered

Saving data from powerapps to SP lists person/Group column

(1) ShareShare
ReportReport
Posted on by 320

Hello ,

i need to save the user info in Person/Groups column of my SP list.

I am selecting the data from a Drop down list.

When i do "DD.selected.value' it gives mee error saying that it needs a record to save.

How can i do this??

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    on at

    Hi @abd3127,

     

    As the Person or group column type in SharePoint list is considered as a lookup field, we should patch the whole record of the person to this field, and depends on whether you have the Multi-Selection enabled, the schema varies.

    I will share an example here.

    1. Patch to the Person or group field, which only allows single value.

    The record of single person would contain the following values:

     

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|michael@wiXXXX.onmicrosoft.com",
     Department:"",
     DisplayName:"Michael Shao",
     Email:"Michael@wiXXXX.onmicrosoft.com",
     JobTitle:"",
     Picture:""
     }

    Each value should match the pre-defined value stored under SharePoint data source, if you have no idea for the Department, JobTitle or Picture field, you may just leave it as "".

     

     

    Fields need to be entered:

    The Value for this field is fixed.

    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",

    for Claims field,you should modify the end of this field to match the person Email:

    Claims:"i:0#.f|membership|michael@wiXXXX.onmicrosoft.com",

    And the DisplayName and Email field, as shown below:

     

     DisplayName:"Michael Shao",
     Email:"Michael@wiXXXX.onmicrosoft.com",

     

    To patch a person to the Person or group field as a new record, the formula should be(Title is a required field when creating new records, so whenever a new record is created, all the required field should be get involved in the patch 3rd parameter.):

     

    Patch(Patchtesting,
    Defaults(Patchtesting), { Title:"SinglePerson", Person: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", Claims:"i:0#.f|membership|michael@testing.com", Department:"", DisplayName:"Michael Shao", Email:"Michael@testing.com", JobTitle:"", Picture:"" }})

     

    For Person or group Field which have Multiple selection enabled, the structure is a little difference.

    For example, the following code would work to patch the MultValue person field:

    Patch(Patchtesting,Defaults(Patchtesting),
    { Title:"MultiPerson",
    Multi_x002d_Person: Table( { Claims:"i:0#.f|membership|michael@testing.com", Department:"IT", DisplayName:"Michael Shao", Email:"Michael@testing.com", JobTitle:"", Picture:""}, { Claims:"i:0#.f|membership|test2@testing.com", Department:"", DisplayName:"Test2", Email:"Test2@testing.com", JobTitle:"", Picture:""}) } )

    Image reference:

    47.PNG

    48.PNG

    46.PNG

     

     

    Regards,

    Michael

  • Community Power Platform Member Profile Picture
    on at

    @v-micsh-msft

    Do you happen to know how to clear the Person column?

    This code below doesn't work (while a similar code works for a regular lookup):

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"",
     Department:"",
     DisplayName:"",
     Email:"",
     JobTitle:"",
     Picture:""
     }

     

  • Community Power Platform Member Profile Picture
    on at

    Bloodoff, did you end up getting this to work. i am after a similar result where i want to use the selected user details and patch them over.

  • Community Power Platform Member Profile Picture
    on at

    @Anonymous nope, it's a limitation currently but there is an "idea" that covers both numeric and person fields. Please make sure to upvote it.

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/Allow-us-to-update-a-numeric-field-to-null-blank-value/idi-p/11700

     

  • Community Power Platform Member Profile Picture
    on at

    thanks, i dont suppose you know how to patch the selected user in a drop down.

     

    I have

    Column: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
                           Claims:"i:0#.f|membership|XXXX@XXXX.com",
                       Department:"",
                      DisplayName:"XXXX",
                            Email:"XXXX@XXXXX.com",
                         JobTitle:"",
                          Picture:""

     

    where X = selected value. Ive tried user() and "" but no luck.

  • Community Power Platform Member Profile Picture
    on at

    It is supposed to work and I have it working just fine. Make sure every bracket is in a proper place.

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims:"i:0#.f|membership|flast@contoso.com",
    Department:"",
    DisplayName:"First Last",
    Email:"flast@contoso.com",
    JobTitle:"",
    Picture:""}

     

    I have an app where this code works too:

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",Claims:Concatenate("i:0#.f|membership|",Office365Users.Manager(Email.Email).Mail),Department:"",DisplayNameffice365Users.Manager(Email.Email).DisplayName, Emailffice365Users.Manager(Email.Email).Mail, JobTitle:"", Picture:""}

     

  • tianaranjo Profile Picture
    497 on at

    @v-micsh-msft

     

    I have been struggling with this for a couple of days.  For some reason, when I go to Patch, the column name (Employee_x0020_Name)  is not available.  

    My DataCard is DataCard4, the property name is DataCardValue3.

    Can you please tell me what I'm missing here?  

     

    Thank you!

     

    Patch(AppAdmins, Defaults(AppAdmins),
    {Trying to put column name here:  
    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",
    Claims:"i:0#.f|membership|" & Lower(User().Email),
    Department:"",
    DisplayName: DataCardValue3.Selected.DisplayName,
    Email:  DataCardValue3.Selected.Email,
    JobTitle:".",
    Picture:"."}});

  • Community Power Platform Member Profile Picture
    on at

    hiya make sure you include the title in the first field of patching ie Title:titledatacard1.Text,

     

    what do you have in {Trying to put column name here:  ?

     

    also you need to specify all the metadata of the emails ie Employee Name:{Claims: dcvemployeename.Selected.Claims, Department: dcvemployeename.Selected.Department, DisplayName: dcvemployeename.Selected.DisplayName, Email: dcvemployeename.Selected.Email, JobTitle: dcvemployeename.Selected.JobTitle, Picture: dcvemployeename.Selected.Picture, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser"

  • JeremyDIV Profile Picture
    68 on at

    Does anyone else find this ridiculously complicated and counterintuitive for what should be a simple task?

  • Community Power Platform Member Profile Picture
    on at

    At least it's working 🙂 

    E.g. nullifying Person fields doesn't even work at all:

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"",
     Department:"",
     DisplayName:"",
     Email:"",
     JobTitle:"",
     Picture:""
     }

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard