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 / Combining filter and s...
Power Apps
Unanswered

Combining filter and search in one statement

(0) ShareShare
ReportReport
Posted on by 2

Hi 

 

I have just started making my first app in PowerApps. And I am also new to the programming language 

 

When I am building my app from Sharepoint the default code for the Gallery in the my Browsscreeen is this: 

SortByColumns(Filter([@'CBS1 Samples']; StartsWith('Sample Name (GHOST)'; TextSearchBox1.Text)); "ID"; If(SortDescending1; Descending; Ascending))

 

I want to both filter and search, but right now I can only get the Filter function to work. 

How is oit possible to both filter for the column: "ID" and search in the different "ID" numbers? 

 

I have search on the topic and tried different approaches, but without luck. 

Categories:
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Esben ,

    Do you want to filter based on two conditions?

    If so, you just need to use ";" connect with two conditions.

    For example, Filter(table;condition1;condition2)

    What do you mean "both filter for the column: "ID" and search in the different "ID" numbers"?

    Actually ,filter and search function is the same meaning, just use different syntax.

    Could you describe more clearly about what do you want to filter based on?

    Based on your formula, maybe you want this:

    SortByColumns(Filter([@'CBS1 Samples']; StartsWith('Sample Name (GHOST)'; TextSearchBox1.Text);TextSearchBox1.Text in ID); "ID"; If(SortDescending1; Descending; Ascending))

     Here's a doc about this function for your reference:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

     

     

    Best regards,

  • Esben Profile Picture
    2 on at

    Hi Phoebe Liu,

     

    Thank you for your response 🙂 

     

    I am sorry that I am not more clear in my request. I have attached a picture of the browsescreen, which is the default screen when I make the powerapp through sharepoint. 

     

    What I want is:

    - When I push the filter button I filter the list for the ID numbers (2,3,4 etc. in the picture)

    - When I use the search function I can write a specific ID number and it returns this row in the table. It could also be 'nice to have' if I could do the same for the "sample name" (MB19-test, MB19-20, etc. in the picture) 

     

    I hope this specifies it more clearly?  

    BrowseScreen.PNG

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard