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 / Filtering Gallery with...
Power Apps
Answered

Filtering Gallery with Multiple Buttons

(0) ShareShare
ReportReport
Posted on by 58

I am building a PowerApp that is connected to a SharePoint List.  I created a Home Screen that contains three (3) buttons.  

  • Buttons:
    • Pending Requests:
      • OnSelect = Set(var,"In progress"); Navigate(BrowseScreen1, Transition.None)
    • Needs Quality Check
      • OnSelect = Set(var,"Needs Quality Check"); Navigate(BrowseScreen1, Transition.None)
    • Completed
      • OnSelect = Set(var,"Done"); Navigate(BrowseScreen1,Transition.None)

I put the OnSelect formula in parenthesis above.  The word in "" is what the SharePoint choice is in the list.

 

On the BrowseScreen1, I have the gallery that is connected to SharePoint and that I am trying to filter using the buttons.  Below is the formula I have but it is not working.  No matter what button I push, all records show no matter what the progress selection is.

  • Formula on Gallery
    • SortByColumns(
         Filter(
             [@'Print Request Tracker'],
              StartsWith(
                  Title,
                  TextSearchBox1.Text
               ),
              If(
                  var = true,
                  Progress.Value = "In progress",
                  Progress.Value <> ""
              )
          ),
          "Title",
            If(
                SortDescending1,
                Descending,
                Ascending
             )
      )

NOTE: the enter new request button take user to edit screens so it does not need to be in the formula

chhamilton34_1-1622561566998.png

chhamilton34_0-1622561525870.png

Can someone help me and tell me what I am doing wrong???

 

 

Categories:
I have the same question (0)
  • Verified answer
    C-Papa Profile Picture
    1,836 on at

    Hi, what about the below

     

    SortByColumns(Filter([@'Print Request Tracker'],StartsWith(Title,TextSearchBox1.Text) && Progress.Value = var),
    "Title",
    If(
    SortDescending1,
    Descending,
    Ascending
    )
    )

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    You are storing string "InProgress" in your variable. And in gallery your are comparing it to Boolean.

    When you click "InProgrees" button on your home screen. Value inside var is "InProgreess" not "true". So just compare that variable against your SharePoint column inside the gallery items property filter condition.

  • chhamilton34 Profile Picture
    58 on at

    OMG thank you so much, it works like a charm....you are the best.

     

    Thank you!!!!

  • C-Papa Profile Picture
    1,836 on at

    That's good news, if it worked do you want to mark it as a solution to help others

  • chhamilton34 Profile Picture
    58 on at

    What if I wanted to add a button to show ALL records.  So when the user pressed it they would navigate to the Browse Screen and all records would be listed, no matter what the Progress column was set at.

  • chhamilton34 Profile Picture
    58 on at

    What if I wanted to add a button to show ALL records.  So when the user pressed it they would navigate to the Browse Screen and all records would be listed, no matter what the Progress column was set at.

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