cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
therush321
Helper II
Helper II

How filter office365users.searchuser for a select few only

Hi

I am trying to filter my people picker list to a select few emails to be used but I am not having any luck.

 

I have installed the MS O365 connector and tried to filter down to a few emails but it does not work for more than 1 email with the code below:

 

items: Filter(Office365Users.SearchUser({searchTerm: DataCardValue24.SearchText});
"rjam@abc.co.za" & "bjam@abc.co.za" in Mail)

 

6 REPLIES 6
mdevaney
Super User
Super User

@therush321 
Use this code in the Items property of your Combobox.

Filter(Office365Users.SearchUserV2({searchTerm: Self.SearchText});

 

Then type the desired email in the text input area of the Combobox.  Users with that search text in their email should appear as an option.

 

---
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."

@mdevaney Thank you very much but I am getting back an error on the items code:

therush321_0-1603284394160.png

 

 

@therush321 
Please share a screenshot of the error message you are recieving.

@mdevaney I have updated the image above to display the error.

@therush321 

Oh, now I can see my code error.  Please try this instead without any FILTER.

Office365Users.SearchUserV2({searchTerm: Self.SearchText})

 

---
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."

 Thank you very much but where would I add my emails that can only be searched and used?

 

@mdevaney  Any thoughts on this?

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (4,891)