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 / Populate user name as ...
Power Apps
Answered

Populate user name as Defaultselecteditems value for Combobox - Expected table values

(0) ShareShare
ReportReport
Posted on by 257

I have a Sharepoint list field that is set to 'People or Group' and I'd like to auto-populate the comboBox in my Power App with the DisplayName of the current user. 

 

I have a variable _myProfile that creates a record for each user but it cannot set the defaultselectedItems value for my Combobox, is there another way to accomplish this?

 

Navia_calendar.jpg

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

    @F_Quint 

    If this is a ComboBox, then you will want to set the DefaultSelectedItems property not the Default.

    In your DefaultSelectedItems, place the following formula (assuming that your _myProfile has an email address as well):

     With({profile:Office365Users.MyProfile()},
    
     {Claims: "i:0#.f|membership|" & profile.Mail, 
     Department: profile.Department, 
     DisplayName: profile.DisplayName,
     Email: profile.Mail,
     JobTitle: profile.JobTitle,
     Picture: "."
     }
    )
    

    Make sure you have AllowSearching on.

     

    I hope this is helpful for you.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @F_Quint 

    I would recommend you follow the advice of @RandyHayes.  But I would also like to point out that you have placed your code inside the Default property and not the DefaultSelectedItems property as mentioned within your title.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • F_Quint Profile Picture
    257 on at

    @RandyHayes  Works great! Thank you so much!

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard