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 / Filter and search with...
Power Apps
Unanswered

Filter and search with exact entry

(0) ShareShare
ReportReport
Posted on by 98

Hello,

I know this has been answered but I need a little bit more help with exactin when filtering and searching as I do not understand where should I put it into my code.

I am filtering the gallery with two selects (is that even a word?) and then I am searching the gallery for the device.

Now I am totally lost on where to put exactin into this in order to filter the name of the device exactly as I have put it into my search box.

Here is whats in items of the gallery.
Search(Filter(Switches,And(SwitchCategoryId = galSwitchSearch.Selected.SwitchCategoryId), And(NodeId = galSwitchSearch.Selected.NodeId)),MainSearch_2.Text,"Device")

Any help is appreciated

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @kajsiretardiran ,

    You have and extra And in there, but this should work

    Search(
     Filter(
     Switches,
     And(
     SwitchCategoryId = galSwitchSearch.Selected.SwitchCategoryId,
     NodeId = galSwitchSearch.Selected.NodeId
     )
     ),
     MainSearch_2.Text,
     "Device"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • kajsiretardiran Profile Picture
    98 on at

    Thank you Warren for that tip but that is not my problem.

    When I search through the gallery lets say with "Carpool" and I have a "Carpool","Car" and "Pool" in the gallery it will always return all three of them and I want the search to return only "Carpool". 

    I understand I have to use exactin somewhere and that is where my problem lies. I have no idea where to put it inside of my code.

  • Verified answer
    WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @kajsiretardiran ,

    I am wonder how "carpool" would return "car" in a search, but if you really want exactin

    Filter(
     Switches,
     And(
     SwitchCategoryId = galSwitchSearch.Selected.SwitchCategoryId,
     NodeId = galSwitchSearch.Selected.NodeId,
     MainSearch_2.Text exactin Device
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

  • kajsiretardiran Profile Picture
    98 on at

    Thank you Warren but could you please explain why did you remove Search infront of the Filter? I have tested this and when I type anything in the Mainsearch_2.text nothing is happening.

     

     

  • WarrenBelz Profile Picture
    153,032 Most Valuable Professional on at

    Hi @kajsiretardiran ,

    I am not a fan of exactin and to be honest Search does the job of finding any instance of a string anywhere in a field (which is why I asked why it was not doing it for you)

  • kajsiretardiran Profile Picture
    98 on at

    I have managed to make it work. There were some typos in the code that I overseen. 

    I now understand why you dont like exactin....

    Thank you for your help you have as always helped alot!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard