Skip to main content
Community site session details

Community site session details

Session Id : 1nPMHB4+JKZdqlhCckRHj0
Power Apps - Building Power Apps
Answered

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

Like (0) ShareShare
ReportReport
Posted on 3 Jun 2024 15:14:20 by 798 Super User 2025 Season 2
  • I am 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:

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)
 

I did two test Test 3 and Test 0044. 

Test 3 - Does not show Inspector name in SharePoint(added image for reference). 

Test 0044 - Does show Inspector name in SharePoint, also showing error in Power apps records(added image for reference). 

What could be the error.

 

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-1717427486293.png

 

mtsts_1-1717427503454.png

 

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 04 Jun 2024 at 19:54:20
  • MTNK Profile Picture
    798 Super User 2025 Season 2 on 04 Jun 2024 at 15:47:59
    Re: Auto populate Person Column(based on user login) in canvas app error

    @Cr1t  I tried the person column menthod.

     

    It gives me same error in the records(added image as reference) while i am testing the app.

     

    mtsts_0-1717516060018.png

     

  • Cr1t Profile Picture
    555 on 04 Jun 2024 at 15:29:31
    Re: Auto populate Person Column(based on user login) in canvas app error

    @mtsts 

    Could you please provide me more info so i can help you better? Is it a Person column or have you used a combobox connected to office 365 connector?

    If it is a person column please follow these steps:
    Items property: 

     

    Choices([@'Walk Through Inspection Checklist 2024'].Inspector)

     

    Default property:

     

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

     

    DefaultSelectedItems:

     

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

     

    DisplayFields:

     

    ["DisplayName"]

     


    If you are using office 365 connector for combobox then please follow the below steps:
    Items property of combobox:

     

    Office365Users.SearchUserV2(
     {
     searchTerm: yourcombobox.SearchText,
     top: 50,
     isSearchTermRequired: false
     }
    )

     

    DisplayFields property:

     

    ["DisplayName","Mail"]

     


    SearchFields property:

     

    ["DisplayName","Mail"]

     


    Update property of the people picker card:

     

    {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|"&yourcombobox.Selected.Mail,
     Department: "",
     DisplayName: yourcombobox.Selected.DisplayName,
     Email: yourcombobox.Selected.Mail,
     JobTitle: "",
     Picture: ""
    }

     


    Please let me know if this works for you. 
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.




  • MTNK Profile Picture
    798 Super User 2025 Season 2 on 03 Jun 2024 at 15:42:01
    Re: Auto populate Person Column(based on user login) in canvas app error

    @Cr1t Thanks much for helping. 

     

    I am using Office365Users as a connector.

  • Cr1t Profile Picture
    555 on 03 Jun 2024 at 15:36:00
    Re: Auto populate Person Column(based on user login) in canvas app error

    @mtsts 

    I have create a sharepoint list with 2 columns Text and Submitted by, 

    Cr1t_2-1717428910334.png

     

     


    Select the people picker datacard and set the Default and DefaultSelectedItems property as 

     

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

     

    Cr1t_5-1717428910503.png

     

    Cr1t_6-1717428910509.png

     


    The person column should display the user name 

     

    Cr1t_7-1717428910409.png

     

     

     

    No the right hand side click edit on fields .

    Cr1t_0-1717428804547.png

     

     

    Please set the primary text and search field to DisplayName.

    Cr1t_1-1717428804433.png

     


    Save and preview the app. 

    Please let me know if this works for you. 
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading started