Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Using "Office365Users.searchUser()" for a people-picker using a combo-box

(0) ShareShare
ReportReport
Posted on by

Hello everybody! 

 

I am trying to use a combo-box to create a People-Picker from a specific group using O365 Users as a connector. 

 

If the group of users in my O365 Users is called "testGroup" , AND my combo-box for my people-picker is called "testComboBox" , would this be the correct syntax for code? There are no errors when I input this code into the "Items" property, but the combo-box isn't pulling up any results in my form. Thank you!

 

 

Sort(
 Office365Users.SearchUser(
 If(
 IsBlank(testComboBox.SearchText),
 {searchTerm: "testGroup"},
 {searchTerm: testComboBox.SearchText}
 )
 ),
 Surname
)

 

 

 

 

--------

 

 

I replaced the testComboBox I used as a parameter within "searchTerm" with empty parentheses (which should pull up all users within the O365 Group), but it looks like I got results without detail when I run the app:

 

jharville_0-1598543980044.png

 

 

 

 

 

 

  • Verified answer
    jharville Profile Picture
    on at
    Re: Using "Office365Users.searchUser()" for a people-picker using a combo-box

    I actually looked in my "Advanced" properties and saw that the DisplayFields was set to the wrong attribute, so I changed it to DisplayName and it fixed the issue. 

     

    Thanks again for your help, I genuinely do appreciate it! 🙂

  • jharville Profile Picture
    on at
    Re: Using "Office365Users.searchUser()" for a people-picker using a combo-box

    Hello,

     

    I'm following an online course and they are saying to put it into the "Items" property of the card we've added to the form, so not sure if inputting into the "gallery" would bring our desired functionality. 

     

    Also, why would I use scheduledMeeting as a parameter if there are no meetings involved?

     

    I attached a screenshot of my code:

    jharville_0-1598543021861.png

     

     

    Thank you!

  • VDS_Mantra Profile Picture
    175 on at
    Re: Using "Office365Users.searchUser()" for a people-picker using a combo-box

    Hi, 

     

    Try this one in gallery.

     

    If(!IsBlank(Trim(txtSearchBoxScheduledMeeting.Text)), Office365Users.SearchUser({searchTerm: Trim(txtSearchBoxScheduledMeeting.Text), top: 15}))

     

    I hope i was able to understand your query. 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard