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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto populate Person C...
Power Apps
Answered

Auto populate Person Column(based on user login) in canvas app

(0) ShareShare
ReportReport
Posted on by 819 Moderator

Hello everyone!

SharePoint list is connected to the PowerApp. I am trying to Auto populate Person Column in canvas app based on user name(so that user do not need to select his/her name) for column named as Inspector.

 

 

I tried the code  in DefaultSelectedItems property - 

 

{
    '@odata.type': "#Microsoft.Office.Connectors.SharePoint.SPListExpandedUser",
    DisplayName: User().FullName,
    Claims: "i:0#.f|membership|" & User().FullName,
    FullName: User().FullName
}
 

However it adds code in record history also( added image for reference).

 

 

mtsts_0-1717007412840.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @mtsts - assuming:

     

    • You're using an EditForm control
    • The Inspector People field in your SharePoint list is configured to single-select
    • The Items property of that ComboBox control inside the DataCard for the Inspector field contains something along the lines of:

    Choices([@'Your List'].'Your Inspector Field'

     
    Then use the below on the DefaulSelectedItems property of the Combobox:

     

    Coalesce(
     Parent.Default,
     {
     Claims: "i:0#.f|membership|" & User().Email,
     Department: "",
     DisplayName: User().FullName,
     Email: User().Email,
     JobTitle: "",
     Picture: ""
     }
    )
  • MTNK Profile Picture
    819 Moderator on at

    @Amik Thanks much for helping.

     

    It is working. However it is not collecting data for Inspector Name as after adding record, there is no Inspector name in SharePoint List.

     

    One follow-up question - the Inspector name is not showing in SharePoint List after adding record(Test 2200) by testing canvas app.

     

    mtsts_1-1717012817032.png

     

  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @mtsts - if that answered the question please remember to accept the solution.

     

    Regarding the other question, what do you have in the Update property of the DataCard? I would expect: 

     

    'Your ComboBox'.Selected
  • MTNK Profile Picture
    819 Moderator on at

    @Amik  Thanks much for helping. The issue is solved.

     

     

  • MTNK Profile Picture
    819 Moderator on at

    @Amik It was working fine. Today whenI tested again, it is not adding Inspector name to my SharePoint Data. What could be the reason.

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

    @mtsts - is there an error message?

  • MTNK Profile Picture
    819 Moderator on at

    @Amik No there is no error message.  I did two test Test 3 and Test 0044. Please look into that.

     

    Update Property 

     

    DataCardValue2.Selected
     
    DisplayMode
     
    Parent.DisplayMode
     
    DefaultSelectedItems
     
    Coalesce(
        Parent.Default,
        {
            Claims: "i:0#.f|membership|" & User().Email,
            Department: "",
            DisplayName: User().FullName,
            Email: User().Email,
            JobTitle: "",
            Picture: ""
        }
    )
     
     
    DisplayFields
     
    ["DisplayName"]
     
    SearchFields
     
    ["DisplayName","Email","Picture"]
     
    Items 
     
    Choices([@'Walk Through Inspection Checklist 2024'].Inspector)

     

    mtsts_0-1717417614447.png

     

    mtsts_1-1717417742001.png

     

     

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

    @mtsts - if I am understanding those screenshots correctly, "Test 0044" updated correctly, but "Test 3" did not?

  • MTNK Profile Picture
    819 Moderator on at

    @Amik Yes it is being updated in SharePoint now however as in the image it is also adding a code with like that with the record name Test 0044, it is adding - i:0#.f|membership|abc@xyz.com

     

    mtsts_0-1717503618828.png

     

  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @mtsts - sorry but you're not making sense here. In one post you have stated it not updating, but now it is updating?

     

    I do not see any errors in your screenshot. The reason the Claims token is appearing in your Gallery is because you should be using:

     

    ThisItem.'Your Inspector Field'.DisplayName

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 248 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 209 Super User 2026 Season 1

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 195

Last 30 days Overall leaderboard