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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using a combo box to s...
Power Apps
Unanswered

Using a combo box to search Office365 users

(0) ShareShare
ReportReport
Posted on by 37

Hi all,

 

I'm trying to use a combo box so that users can search for other staff in my organisation, and select their name.

 

I have set the DisplayFields and SearchFields property to ["DiaplyName"] each.

 

Now if I associate the Items field with the text of a text box, it works exactly as intended. My search in the text gradually limits the items until one remains, searching all users.

 

Items = Office365Users.SearchUser({searchTerm: text_title.Text})

 

But this relies on a separate text box, I want to be able to do this with the Combo Box's own search box.

However, this only searches through a limited list retruend from Office365Users. It seems the combo box Items auto populates with a limited number of users, using a textbox search, searches through all users in the orga, using the combo box's own search, it looks only through the initial limited selection.

 

There's a couple of threads on this already, but they are all from 2018, and below says that this will be resolved by April 2018. But despite this I still can't solve the issue.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/People-Picker-filter/td-p/102675

 

Can someone advise if a solution is now available? It's very unprofessional to have 2 boxes, with 2 search fields when only one works and updates the items on another.

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    PowerApps has this built in, try adding a People screen like this:

    2020-01-28 08_09_31-SQLQuery35.sql - ubpos02_liberty.INVENTORYSCAN (OWENSGROUP_elott (112))_ - Micro.png

    ---
    If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

  • DevPower Profile Picture
    37 on at

    antely that's not ideal. I'm creating a ticket system. The logic is that on the submit form, the user can search for another user in the org who they are logging this on behalf of. I have tried integrating a gallery but it causes a lot of problems, it covers a lot of other fields in the form, it's less dynamic, etc.

     

    It seems like the combo box is perfectly suited to this, is there no other way?

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    You can use this:

    Office365Users.SearchUser({searchTerm:ComboBox1.SearchText}).DisplayName

    Where the search term references the combobox itself. (i.e. this would be ComboBox1's Items property).

    You'll need to set the combobox's 'Allow searching' property (on the Properties pane on the right) to true 

  • DevPower Profile Picture
    37 on at

    Seems to have done it. Nice one Eric, excellent help.

  • ewfefwef Profile Picture
    57 on at

    Combo box solution.

    If(!IsBlank(Trim(Combo.SearchText)), Sort(Filter(Office365Users.SearchUser({searchTerm: Trim(Combo.SearchText), top: 15}),AccountEnabled),DisplayName,Descending))

    Properties 

    ewfefwef_0-1618465326023.png

     

  • dibb Profile Picture
    34 on at

    perfect, thanks man

  • Community Power Platform Member Profile Picture
    on at

    The solution is working but there are too many in the result. I got all the name of employee in my company plus outsorces who are now working in my company.

     

    Is there a way to filter the result further to list only some departments or some specific email domainnames?

  • NBMS_2019 Profile Picture
    59 on at

    I have a SharePoint List Lookup field being customized in Power Apps. This is not valid for me "Office365Users." as part of the formula for SearchFields property.

     

  • Krishna09 Profile Picture
    234 on at

    @ewfefwef  I tried the formula you mentioned. but what to use instead of SearchUser. It shows invalid for me

    Even I am facing same problem. I am using Users table from dataverse as datasource. if I use items = Users , i amnot able to see all users so i used below formula for items. then my Isseaerchable is turning false.  So can you guide me to solve this for my datasource.

    my items =With(
    {
    data1: Filter(
    Users,
    StartsWith(
    'Full Name',
    ComboBox5.SearchText
    )
    )
    },
    Sort(
    Distinct(
    data1,
    'Full Name'
    ),
    Result
    )
    )

  • loha Profile Picture
    53 on at

    This works great, thank you. I would like to view only users who belong to a certain user group, I have the object ID of the group and was wondering if this could be done in the combobox search? 

     

    I have got it working by creating a collection and searching the collection but would prefer it done within the app if possible?

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard