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 / Modern Combobox: Defau...
Power Apps
Suggested Answer

Modern Combobox: DefaultSelectedItems with people picker

(0) ShareShare
ReportReport
Posted on by 40
Hey!
I'm trying to use a modern combobox that displays the email of the selected user based on a variable that retrieves the email of the Project Leader from a "Person" column in my Sharepoint list.
 
When I use the variable "varSelectedProject.Leader.Email" directly in a label or a textbox, it shows the email correctly. However, when I insert the same variable in the combobox's DefaultSelectedItems field, it shows an error saying "it expects a value compatible with Items". My combobox properties are as follows:
 
DefaultSelectedItems: {Value:varSelectedProject.Leader.Email}
Items: UsuáriosdoOffice365.SearchUser({searchTerm:cbx_project_leader.SearchText})
ItemDisplayText: ThisItem.Mail
 
How does the app automatically select a person's email address in this modern combobox?
comboerror.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @nok,
     
    Issue is happening because DefaultSelectedItems must receive the same record/Scheme structure as the ComboBox Items property returns.
     
    Try below code in DefaultSelectedItems of the control:
    LookUp( 
               UsuáriosdoOffice365.SearchUser({ 
                         searchTerm: varSelectedProject.Leader.Email 
              }), Mail = varSelectedProject.Leader.Email)
    works because the ComboBox expects the exact same schema as returned from Item.
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

  • Kushal_M Profile Picture
    296 Super User 2026 Season 1 on at
    Hello  ,
     
     
    DefaultSelectedItems expects a table, even for single select comboboxes.
    Wrapping the record in [] creates a single-row table.
    The returned record from UserProfileV2() matches the schema expected by the ComboBox Items source.
     
     
    DefaultSelectedItems:
    [
        Office365Users.UserProfileV2(varSelectedProject.Leader.Email)
    ]
    or 
    {
    Mail: varSelectedProject.Leader.Email,
    DisplayName: varSelectedProject.Leader.DisplayName
    }
     
    Items: Office365Users.SearchUser({searchTerm: Self.SearchText})
    DisplayFields: ["DisplayName"]
    SearchFields: ["DisplayName","Mail"]
     
    That will auto-select the existing SharePoint Person value correctly.
     
    🏷️ Please tag me @Kushal_M, if you still have any queries related to the solution or issue persists.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard