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

Community site session details

Session Id : KpPg/K7tX6Ibgw3ZPdYWgp
Power Apps - Building Power Apps
Answered

Set combo box default item to the current user

Like (0) ShareShare
ReportReport
Posted on 8 Mar 2021 11:14:38 by

Hi all,

 

I have another question. On the home screen of one of my apps the users search for and select themselves so they can record data about what work they're doing throughout the day.

 

The combo box is a standalone input field, so not part of a form. The items property is: Filter(Office365Users.SearchUser({searchTerm: Self.SearchText}), Department = "Corporate Resources, IBC").

 

I cannot figure out what piece of code to put in the DefaultSelectedItems property of the combo box.

 

I think it needs to be something like this(?): Filter(Office365Users.SearchUser({searchTerm: Self.SearchText}), Mail = User().Email).

 

The screen looks like this: 

freddiejoseph1_0-1615201967462.png

 

I have seen lots of posts about doing this using sharepoint as a datasource, but not the O365 Users connector.

 

Thanks,

 

Freddie

 

Categories:
  • Community Power Platform Member Profile Picture
    on 08 Mar 2021 at 12:37:08
    Re: Set combo box default item to the current user

    Thanks. This works perfectly!

  • Verified answer
    Community Power Platform Member Profile Picture
    on 08 Mar 2021 at 12:33:14
    Re: Set combo box default item to the current user

    You're very close! This will work to default select the current user:

     

    First(Office365Users.SearchUserV2({searchTerm:User().Email}).value)
  • timl Profile Picture
    35,227 Super User 2025 Season 2 on 08 Mar 2021 at 11:54:22
    Re: Set combo box default item to the current user

    Hi @Anonymous 

    You might find that just setting the DefaultSelectedItems property to this will work.

    [User().Email]

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on 08 Mar 2021 at 11:51:56
    Re: Set combo box default item to the current user

    You said:

    I think it needs to be something like this(?): Filter(Office365Users.SearchUser({searchTerm: Self.SearchText}), Mail = User().Email).

     

    Have you tried this?

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 complete