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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Exclude a string from ...
Power Apps
Answered

Exclude a string from gallery search

(0) ShareShare
ReportReport
Posted on by 286

Hello

         I am looking for a simple way to exclude a certain text string from a gallery search results box. 

 

I am currently using 

Search(datasource,SearchInput.Text,"FullName")

Which works as intended to return results based on what the user types into the search field. 

However i have some users that are added to the data source temporarily that i do not want showing up in the search. These users all have the same "FullName" as TEMP. 

Is there a way to search the data source by what the user types in but exclude any results that match the string "Temp"?

Categories:
I have the same question (0)
  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    You can combine Filter and Search with something like this:

    Search(Filter(datasource, !('Full Name' = "TEMP"),SearchInput.Text,"FullName")

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

    Hardit(Haman)
  • stephenJames Profile Picture
    286 on at

    Thanks @PowerAddict I had to modify your code just a little but it works great thank you. Nothing to major just had to add a extra  parenthesis after "Temp".

     

     

    Original 

    Search(Filter(datasource, !('Full Name' = "Temp"),SearchInput.Text,"FullName")

    Modified

    Search(Filter(datasource, !('FullName' = "Temp")),SearchInput.Text,"FullName")

     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Yea my bad. Glad it worked!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard