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 / Auto-populate Person f...
Power Apps
Answered

Auto-populate Person field/column from Office365 Users in Power Apps(Canvas app)

(0) ShareShare
ReportReport
Posted on by 819 Moderator
Good morning!
 
Table({Cliams:"i:0#.f|membership|" & User().Email, DisplayName: User().FullName, Email:User().Email})
 
The above formula is working for me to populate User Name for Person type field/column(Inspector). There are two issues with the code -
 
1. Inspector name is not reflecting in my SharePoint list for records added/submitted.
 
2. In Power apps records history, records User name is keep changing to the person who is using the app for old records also.
(For example - I created one test record and another test record is created by my Boss. And both the old records on power app showing my name when I am checking old records and on my Boss end it is showing his name for both old records added.)
 
 
AND
 
I tried another way -
 
{
   '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   DisplayName: User().FullName,
   Claims: "i:0#.f|membership|" & User().Email,
   Email: User().Email
}

 

It is showing Inspector name in my SharePoint list however in the records for Test Record it is showing something like in second  image.  I need help to make change into the code from Azure to O365 and to solve the error.

 

 

Screenshot 2024-05-28 at 10.59.44 AM.png
Screenshot 2024-05-28 at 10.36.36 AM.png
Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @mtsts - As I understand it, you have SharePoint list. You have a single-select People field in that list called "Inspector".

     

    You have created an Edit Form control which is bound to this list. You have added the "Inspector" field into this EditForm as a DataCard.

     

    You modified the Items property of the ComboBox control inside the "Inspector" DataCard by removing the Choices formula and instead added the Office365 Users table.

     

    You now want to update your SharePoint list with the selected name from the ComboBox, and ensure the ComboBox returns the correct Inspector name for existing records.

     

    Is that correct?

  • MTNK Profile Picture
    819 Moderator on at

    @Amik  Thanks much for helping. 

     

     

    Yes you are correct.

    Screenshot 2024-05-29 at 10.10.17 AM.png
    Screenshot 2024-05-29 at 10.13.52 AM.png
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @mtsts - based on those screenshots, I am not correct. You mention you're using the Office 365 Users table as a data source, but that table is not referenced anywhere in the Items property of that ComboBox...

  • MTNK Profile Picture
    819 Moderator on at

    @Amik Can you help me to solve it as per my question posted or images shared. 

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @mtsts - unless you can explain what you're trying to do (ideally in a couple of sentences), I am afraid cannot help you.

  • Verified answer
    MTNK Profile Picture
    819 Moderator on at

    @Amik Thanks much for helping . The issue is solved. Here is the link for solution shared by you - 

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Auto-populate-Person-Column-based-on-user-login-in-canvas-app/m-p/2780455#M680682

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard