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 / 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)
  • EMA03356 Profile Picture
    221 on at

    Under the IssueStatus.Value=

  • 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

    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

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

  • EMA03356 Profile Picture
    221 on at

    Yes 

  • 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, but with that code I get this error. 

    EMA03356_0-1695662658223.png

     

  • 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. 

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
Kalathiya Profile Picture

Kalathiya 422

#2
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 325 Super User 2025 Season 2

Last 30 days Overall leaderboard