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 Apps
Answered

Search and Filter

(0) ShareShare
ReportReport
Posted on by 43

Hello,

I’m a novice at power aps and have recently created a canvas app based on a SharePoint list using the default layout that came up. There are a couple things I can’t get working and would like some assistance please.

 

On BrowseScreen1 the search function only searches the first letter of the ‘title’ field, I’d like it to search the whole title. I’ve tried to change the formula to use IsMatch, Match and MatchAll instead of StartsWith but had no success. The current formula for the browse gallery is ‘SortByColumns(Filter([@SpareParts], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending))’

browse gallery.PNG

Also I have added a drop down to BrowseScreen1 and was hoping to filter on category. However the drop down is based on a category column in the SharePoint list and does not appear as an option in value (see screenshot, the column I want is called ‘category’). As a work around I used the formula ‘Distinct(SpareParts, Category.Value)’ but this only pulls through 8 of the 11 options that are available in SharePoint. How can this be resolved and can the dropdown be added to the browse gallery formula to either be filtered or searched or both?

no category field.PNG

Thank you, regards

Nick

 

Categories:
I have the same question (0)
  • Himanshu_90677 Profile Picture
    416 on at

    Did you try lookup instead of Startwith

  • Nick_k Profile Picture
    43 on at

    Thanks for the replay.

    Startswith doesn't seem to work, if I change the formula to that no records are found. 

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Nick_k :

    Q1:How to search the whole title

    Please try:

    SortByColumns(
     Search([@SpareParts], TextSearchBox1.Text,"Title"), 
     "Title", 
     If(SortDescending1, Descending, Ascending)
    )

    Q2:How can this be resolved and can the dropdown be added to the browse gallery formula to either be filtered or searched or both?

    Please try:

    Choices(SpareParts.Category)

    Best Regards,

    Bof

  • Nick_k Profile Picture
    43 on at

    Hi Bof,

    Thanks for your reply. The formula for the dropdown works great. But the string for the search still only search from the begining character, not the whole title, for example if an item has the word 'valve' in it say four letters in and search for valve the search will not return any value.

    Regards

    Nick

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Nick_k :

    Search function supports fuzzy query. The reason you're not getting results is probably because of delegation issues(Only the first 500 records can be retrieved by default, and only the first 2000 records can be retrieved at most). But depending on your needs, delegation issues cannot be avoided

    vbofengmsft_0-1647395839648.png

    Best Regards,

    Bof

  • Nick_k Profile Picture
    43 on at

    Thanks Bof.

    I have actually just got the search to work with your suggest formula, this is great! Not sure why it didn't apply to the browse gallery before.

    Is there a way I can apply the filter of the dropdown and the search to the browser gallery?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Nick_k :

    You could try:

    SortByColumns(
     Filter([@SpareParts], TextSearchBox1.Text in Title), 
     "Title", 
     If(SortDescending1, Descending, Ascending)
    )

    Best Regards,

    Bof

  • nish5562 Profile Picture
    23 on at

    try this

     Lookup(Title= TextSearchBox1.Text)

  • Nick_k Profile Picture
    43 on at

    Thanks Nish, i got the search working with Bof's string.

     

    @v-bofeng-msft to incorporate the dropdown to filter wouldn't I need to reference the dropdown (dropdown1) in the string too? something like:

    SortByColumns(
    Search([@SpareParts], TextSearchBox1.Text,"Title"),
    "Title", Filter([@SpareParts], Dropdown1.text,"category"), "category",
    If(SortDescending1, Descending, Ascending)
    )

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    HI @Nick_k :

    Please try:

    SortByColumns(
     Filter([@SpareParts], TextSearchBox1.Text in Title And Dropdown1.text = category), 
     "Title", 
     If(SortDescending1, Descending, Ascending)
    )

    Best Regards,

    Bof

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard