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 / Issue updating "Person...
Power Apps
Answered

Issue updating "Person or Group" field type on a SharePoint List from PowerApps

(0) ShareShare
ReportReport
Posted on by 17

Hi all

 

I have one niggling issue with a form I've made with PowerApps.

 

With regards to a "Person or Group" field in SharePoint, which is a "Combo Box" in PowerApps, I added a function under the DefaultSelectedItems property so that it auto populates with the logged in user's information like so...

Office365Users.UserProfile(User().Email)

 

This works great, when I click the NEW button to "fill out the form", I can see this field is being auto populated with the logged in user. However, when the form is submitted, this entry just isn't filled in on the resulting form. What is very strange, is that this field is mandatory, so if it's empty, the form submission should fail, but it doesn't!

 

I do set a variable on app launch, it is...

Set(varUserEmail, User().Email)

 

I have tried to amend the code in the DefaultSelectedItems to Office365Users.UserProfile(varUserEmail) hoping this will fix it but it doesn't.

 

Thanks for reading, any help greatly appreciated.

 

Regards

Steven

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @stevenspray 

    Please consider changing your Formulas to the following:

    1) For your DataCard in the form. 

       a) Set the Default Property to the following:

    With({usr:User()},
     
     If(IsBlank(ThisItem.yourColumnName), 
     { 
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
     Claims:"i:0#.f|membership|" & usr.Email, 
     Department:"", 
     DisplayName:usr.FullName, 
     Email:usr.Email, 
     JobTitle:".", 
     Picture:"."
     },
    
     ThisItem.yourColumnName
     )
    )

    (replace yourColumnName with the name of the appropriate field)

     

      b) Set the Update property to the following Formula: yourComboBox.Selected  (replace yourComboBox with the name of your combobox in the datacard.

     

    2) On the ComboBox

       a) Set the DefaultSelectedItems property to the following:  Parent.Default

       b) Ensure the Items property is set to:  Choices([@yourDataSource].yourColumnName)

       c) Assuming your Primary Text field on the DataCard is DisplayName

     

     

    That should get you where you need to be.

     

    I hope this is helpful for you.

  • stevenspray Profile Picture
    17 on at

    Hi @RandyHayes

     

    I wasn't sure how your longwinded code would work, but it did. When the new button was clicked, the field was auto-populated with the logged-in user's info, but unfortunately just like before, it's having the same result. The form gets submitted successfully but this required field that was auto-populated a moment before just doesn't apply in the resulting form. Thanks for the reply though, any other pointers?

     

    EDIT:

    Think I should add that my "yourColumnName" is different in the two places you mentioned.

    In the Default property formula, this is "Requester Name", and in the Combo Box Items property, it is "Requester_x0020_Name". Not sure if that is relevant or not.

     

     

    Regards

    Steven

  • stevenspray Profile Picture
    17 on at

    Hey @RandyHayes 

     

    Many apologies!

     

    Your solution did work!

     

    I erroneously entered your longwinded code into the wrong Default property element! I accidentally did this in the Combo Box's Default value. I rechecked and found I made this mistake.

     

    Sorry again and thanks a bunch!!!

     

    Regards

    Steven

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

    @stevenspray 

    Longwinded as the Formula may be, it is what is required for a SharePoint person column.  Unfortunately, the Office365 User profile information is in a completely different format/signature than a SharePoint person record.  However, it is easily translated from one to the other with the record structure shown in the formula provided.

     

    Glad it is all working now for you!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard