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 / Filter gallery by choice
Power Apps
Unanswered

Filter gallery by choice

(0) ShareShare
ReportReport
Posted on by 221

Hello, I have an app gallery going. I'd like to maintain the code I have here. How do I add a filter in the code to show only the entries with the status, "requested". 

 

SortByColumns(Filter([@'Issues Log'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

Categories:
I have the same question (0)
  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    I assume you want to combine the filters, so items that start with the text in the text box and also have a status of requested?

     

    SortByColumns(Filter([@'Issues Log'], StartsWith(Title, TextSearchBox1.Text) && Status.Value="Requested"), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

     

    The && means "and". The .value is needed for choice columns. 

  • EMA03356 Profile Picture
    221 on at

    Yes, but with that code I get this error. 

    EMA03356_0-1695662658223.png

     

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Your source is a sharepoint list, and the status column is a single-select choice field? 

  • EMA03356 Profile Picture
    221 on at

    Yes 

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    Please post your updated code. I tested what I provided above and it is working with no issues.

  • EMA03356 Profile Picture
    221 on at

    SortByColumns(Filter([@'Issues Log'], StartsWith(Title, TextSearchBox1.Text) && IssueStatus.Value="Requested"), "Title", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending))

  • Mike2500 Profile Picture
    1,247 Super User 2024 Season 1 on at

    I copied and pasted your code and it's working fine in my environment.  When you look at the formula, where specifically is the run underline showing up?

  • EMA03356 Profile Picture
    221 on at

    Under the IssueStatus.Value=

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard