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 Pages / Combine Filter and Sor...
Power Pages
Answered

Combine Filter and Sorting in Gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello community,

I have the following problem:
I only want to see the data in a gallery that I have previously filtered and still want to have the option to search for individual items.

 

This is how it looks like:

Marvin_Heile_0-1620388402559.png

 

I figured out how to create the code for filtering via the text search box and how to filter via the tiles individually:

 

Here is my code for filtering via the text search box: 

SortByColumns(Search([@Table1], TextSearchBox1.Text, "FIXEDASSETNUMBER","ACTIVITYCODE","BARCODE"), "FIXEDASSETNUMBER", If(SortDescending1, Descending, Ascending))

 

Here is the code for filtering via the tiles:

 

If(

    Gallery1.Selected.Value = "All",

    Filter(

        Table1,

        StartsWith(

            "FIXEDASSETNUMBER",

            TextSearchBox1.Text

        )

    ),

    Filter(

        Table1,

        StartsWith(

            "FIXEDASSETNUMBER",

            TextSearchBox1.Text

        )&& OVERDUE = Gallery1.Selected.Value

    )

)

 

My question: How can I combine this code?

 

(I am working with a excel file as my data source)

 

Thank you very much for your help!

 

Categories:
I have the same question (0)
  • Verified answer
    Christian Leverenz Profile Picture
    1,214 on at

    Hi @Marvin_Heile ,

    could it be, that this question belongs to Power Apps and is faster answered here: https://powerusers.microsoft.com/t5/Building-Power-Apps/bd-p/PowerAppsForum1  ? 

    Have fun,

      Christian

  • Marvin H Profile Picture
    Microsoft Employee on at

    Thank you. Yes. Something went wrong here with the tagging. I will repost the question in the "Building PowerApps" discussion.

  • Christian Leverenz Profile Picture
    1,214 on at

    @Marvin_Heile : welcome and thanks for the solutiontag

    Christian

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 56

#2
Valantis Profile Picture

Valantis 28

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard