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 / Display default value ...
Power Apps
Answered

Display default value of person column from SharePoint in powerapps

(0) ShareShare
ReportReport
Posted on by 2,567

Hi

 

What I'm trying to achieve is to display the selected person when i click edit form in power apps.

My column is a SharePoint person column named "Approver"

When i go to power apps and click edit the form for the specific item the default value should display the person in the column but it display nothing.

 

The default value i have tried to set it to ThisItem.Approver but the result is the same it is blank.
If i try ThisItem.Approver.displayName i get an error due to it is a person column and will not display a text string but needs a record.

 

Approver column = SharePoint Person column.
Approver items = Office365Groups.ListGroupMembers("groupID").value

But how do i fetch back the data from the SharePoint column so it default displays the person in the "Appprover" column

Categories:
  • JimmyW Profile Picture
    2,567 on at

    Tried this in Default but still no luck

     

    { 
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",	
     DisplayName:ThisItem.Approver.DisplayName,
     Claims:"i:0#.f|membership|" & ThisItem.Approver.Email, 
     Email:ThisItem.Approver.Email
    }

    When the form is in edit mode i want i to pre select the data from the SharePoint person column "Approver"
    So if the column contains the user "John Smith"

    Then when i click edit form in power apps i want "John Smith" to be pre selected 

  • JimmyW Profile Picture
    2,567 on at

    Seems that if i put this in DefaultSelectItem it works, don't know why i need the brackets?

    [ThisItem.Approver.DisplayName]

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@JimmyWork,

    Do you want that whenever users try to add a new record, keep a specific person as selected automatically (default) in person field?

    You must set the DefaultSelectedItems property which makes your expressions work. 

    I have a test on my side which goes well.

    0505-1.png

    And as an alternative solution, you can try the following formula in DefaultSelectedItems property:

    If(

        EditForm1.Mode = FormMode.Edit,

        {

            DisplayName: ThisItem.Approver.DisplayName,

            Claims: "i:0#.f|membership|" & Lower(ThisItem.Approver.DisplayName)

        },

        Parent.Default

    )

  • JimmyW Profile Picture
    2,567 on at

    Thank you @v-qiaqi-msft I have tested your solutions before i saw your post and it does not work for me.

     

    I just want it to keep the when you click edit form/item. If i use your options they will all end up blank.
    For example the below will just say "Select Approver" will not display the already selected approver.

    If(
    
     FormEditTicket_1.Mode = FormMode.Edit,
    
     {
    
     DisplayName: ThisItem.Approver.DisplayName,
    
     Claims: "i:0#.f|membership|" & Lower(ThisItem.Approver.DisplayName)
    
     },
    
     Parent.Default
    
    )

      Same goes for the part below, i already tested this and it will also just stay blank.

    { 
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",	
     DisplayName:ThisItem.Approver.DisplayName,
     Claims:"i:0#.f|membership|" & ThisItem.Approver.Email, 
     Email:ThisItem.Approver.Email
    }


    If the column "Approver" contains a person i want that person to be the default value if the form is in display or edit mode. None of the above works. But this line works and i don't know why, the closing brackets makes the difference

    [ThisItem.Approver.DisplayName]


    2020-05-05 09_32_30-Beta Helpdesk Testing 2 - Saved (Unpublished) - Power Apps.png2020-05-05 09_32_39-Beta Helpdesk Testing 2 - Saved (Unpublished) - Power Apps.png

  • JimmyW Profile Picture
    2,567 on at

    bump

  • JimmyW Profile Picture
    2,567 on at

    I just need to understand what the brackets do and why they work and nothing else.
    Can i use the Brackets or is it a big no in powerapps?

  • JimmyW Profile Picture
    2,567 on at

    Sorry for bumping this again but i really need clarification if i can use with square brackets ?

    [ThisItem.Approver.DisplayName]

     

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@JimmyWork,

    Sorry for the late reply.

    Based on the issue you mentioned, let me explain it.

    Square brackets usually imply it's a collection/table element. So how you set your Item property determines which symbol you should use to quote.

     

    [ThisItem.Approver.DisplayName]

     

    The expression above may be a table column in your Table, so you have to use “[“,“]” to quote it.

    The Item you set the 'Approver' is a table, too.

     

    Best Regards,

    Qi Qiao

  • JimmyW Profile Picture
    2,567 on at

    @v-qiaqi-msft Thank you for the explanation, much appreciated.

     I can now move forward and be happy with using a correct solution 🙂

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard