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 / Fuzzy Search and filte...
Power Apps
Unanswered

Fuzzy Search and filtering

(0) ShareShare
ReportReport
Posted on by 10

Hi, 

 

I'm trying to build my first app and am having some issues.  Hopefully someone can help me.  I am trying to make the address search fuzzy and also add a toggle button to filter 'Site Fully Cleared?' Yes/No on the gallery display.  I have tried to change the code from StartsWith to Lookup, Search etc but it removes the address from the job in the gallery and gives me an error.  Can someone please take a look and point me in the right direction?  I have supplied some screenshots to help.  Thanks, David

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    Hi.

     

    Change the code to 

    SortBy(Search(Filter))). I guess you are trying to search in filtered data, and not filter search data?

     

  • deemon1981 Profile Picture
    10 on at

    Thanks for your reply Turbotape!

     

    This is my original code, I am not quite sure which part to change.  The way this currently works is if I search for address I need to enter the number first whereas the end user might find it easier to type a street name in.

    SortByColumns(Filter([@'SGN SLG Master List'], StartsWith(Address, TextSearchBox1.Text)), "Address", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

  • Community Power Platform Member Profile Picture
    on at

    Ah! Looking more closely you are using filter and search, you only have to use Search like this

    SortByColumns(
    Search(
    TextSearchBox1.Text,
    "Address"
    ),

    "Address",SortOrder 
    ).

     

    If you want to use StartsWith change the search section to:
    Filter(
    'SGN SLG Master List';
    StartsWith(

    Address;
    TextSearchBox1.Text
    )
    )

    By the way, as you see I dont use @[] when refering to a datasource.

    Please note StartsWith is delegable, Search is not. 

     

     

  • deemon1981 Profile Picture
    10 on at

    Ok, so I think I got the code down correctly however there seems to be an error in the code and is also causing some of my other data to disappear (pic attached).  SortByColumns(Search(@'SGN SLG Master List', TextSearchBox1.Text, "Address"), "Address", SortOrder))

  • Community Power Platform Member Profile Picture
    on at

    Try replace @['SGN SLG Master List'] with only 'SGN SLG Master List'.

  • deemon1981 Profile Picture
    10 on at

    That seems to have removed the formula issue but now the data in the gallery below is not appearing.  As if it's not pulling from my sharepoint list anymore.

  • Community Power Platform Member Profile Picture
    on at

    I see I was a bit quick and just typed SortOrder as short for the code you had, sorry about that. This mean you should use the sortOrder if statment you had in your original code

     

    "If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))". Try fix this and it should look something like this:

    SortByColumns(
     Search(
     'SGN SLG Master List'; 
     TextSearchBox1.Text;
     "Address"
     );
    "Address";If(SortDesending1;SortOrder.Descending;SortOrder.Ascending)
    )

    Also, what error do you get in the gallery fields (3 red berries)?

     

  • deemon1981 Profile Picture
    10 on at

    Ah ok, I have changed the code and getting no errors in the formula.  

    SortByColumns(Search('SGN SLG Master List', TextSearchBox1.Text)), "Address"), If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

     

    Yes, now I am getting red berries, where the gallery data should be (pic attached)

  • Community Power Platform Member Profile Picture
    on at

    What does the error say? You can mouseover the berry. 🙂

  • deemon1981 Profile Picture
    10 on at

    Some say Name Isn't valid. 'This item' not recognised, these are values pulling in from the sharepoint list.  A couple of others are saying 'unexpected characters. characters are used in the formula in an unexpected way.  Will add some screenshots.  Appreciate your help with this!

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard