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 / Shoutouts Canvas App -...
Power Apps
Answered

Shoutouts Canvas App - Filter Disabled and Admin Users

(0) ShareShare
ReportReport
Posted on by 48

Hi all,

 

I'm currently working on customising the Shoutouts Canvas app, and have noticed the search bar at the top of the app is returning disabled users when searching (at our organisation we do not delete accounts, we set them to disabled and change the display name to have "TERM - " at the front of it), also is returning results for our admin accounts (these have "_a" at the end of the username).

 

I'm wondering if there is a way to filter these results out easily? 

 

Currently "items" on the search box is set to:

 

If(IsBlank(ComboBoxUserSearch.SearchText),
 Office365Users.SearchUser(),
 Office365Users.SearchUser({searchTerm: ComboBoxUserSearch.SearchText, top: 20})
)

 

Thanks for your help in advance! 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Powerapps_Dan ,

     

    Please try modify the code to:

    If(IsBlank(ComboBoxUserSearch.SearchText),
     Filter(Office365Users.SearchUser(),AccountEnabled),
     Filter(Office365Users.SearchUser({searchTerm: ComboBoxUserSearch.SearchText, top: 20}),AccountEnabled)
    )

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    Thank you so much! That worked perfect to remove disabled users!

     

    Would there be a way to also filter out users that have "- Admin" in their display name? 

  • v-jefferni Profile Picture
    on at

    Hi @Powerapps_Dan ,

     

    You can add a condition in Filter functions:

    EndsWith(DisplayName,"Admin")

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Edit: All good, Not(EndsWith(DisplayName,"Admin")) works perfect. Thanks for your help!

     

    Hi @v-jefferni ,

     

    That works to include users with "Admin" in their display name. Is there a way to exclude them? 

  • v-jefferni Profile Picture
    on at

    Hi @Powerapps_Dan ,

     

    You could add a "!" or use Not() function:

    !EndsWith(DisplayName,"Admin")
    Not(EndsWith(DisplayName,"Admin"))

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard