Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

office365

(2) ShareShare
ReportReport
Posted on by 114
I am using the office365 function to lookup people's name in my company but for some reason I am getting weird entries in it too along with the names. Screenshot attached. I want to ensure that only the names of people show up. Kindly help. 

the formula I used is:
 
Office365Users.SearchUser({searchTerm:Combox_CatApprover.SearchText})



Categories:
  • curiousperson01 Profile Picture
    114 on at
    office365
    Hi staronline1and2,

    sorry I do not know how to tag you. 

    I tried your suggested code - it doesn't show telesense options once I put this code. So it is not working I guess. I used this code below - (account enables purposely removed because it was also not working)
     
    Filter(
        Office365Users.SearchUser({top: 999}),
        EndsWith(
            Mail,
            "@abcd.com"
        )
    && Not(
            IsMatch(
                DisplayName,
                ".*\d.*"
            )
        )
    )


    switched name and email in primary and secondary too - didn't work that way either.

  • staronline1and2 Profile Picture
    44 on at
    office365
    I am assuming you are usingDisplayName. In our environment, we have system names, and we are trying to filter them out to get real users. This is the code I have for the Item property. Sometimes, when your users contact some users outside of the company, those users get added to the Entra ID or Active Directory.
     
    Filter(
            Office365Users.SearchUser({top: 999}),
            AccountEnabled //Only show accounts with no sign-in blocked
            && EndsWith(Mail, "@yourcompany.com") //Only show accounts from your company
            && Not(IsMatch(DisplayName, ".*\d.*")) //Only show accounts that doesn't have number
    )
     
    It is not perfect but I am thinking about adding first name and last name to the filter. I do know some people have three names or more.

    Maybe add these as well? 
    \p{L}+\s\p{L}+

    I am not sure about different languages. Just try some of these.
  • Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    office365
    Apologies, I just saw WarrenBelz already suggested what I wrote.
     
    Kind regards, 
    Nandit
  • curiousperson01 Profile Picture
    114 on at
    office365
    Hi @nandit

    It is still the same as the screenshot I posted below today. 

    Also, can you please advise how to tag someone in a reply? I am using "@Nandit" but nothing pops up to tag.
  • Suggested answer
    Nandit Profile Picture
    1,563 Super User 2025 Season 1 on at
    office365
     
    Can you please check the Fields property to make sure you have the "DisplayName" selected for both Primary and Search fields. 
    Here's a screenshot:
     
    For the Modern Combobox, you will be adding the DisplayName by clicking on "Add field" button:
    Hoping this will resolve you issue. Do share how it goes.
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!

     
  • curiousperson01 Profile Picture
    114 on at
    office365
     
    still the same
  • WarrenBelz Profile Picture
    146,645 Most Valuable Professional on at
    office365
    Try deleting and re-creating it - should work with the settings you have
  • curiousperson01 Profile Picture
    114 on at
    office365
  • WarrenBelz Profile Picture
    146,645 Most Valuable Professional on at
    office365
    I am not sure why that does not work - you are currently displaying a field other than DisplayName - you just need to display that. Can you please send a screenshot of the same panel I posted.
  • curiousperson01 Profile Picture
    114 on at
    office365
    @WarrenBelz
    It doesn't solve it yet.
    Also, how are you tagging me in the replies? I am using "@and then your name" as it appears on the replies but it doesn't work for me.

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,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard