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 / Create a gallery upon ...
Power Apps
Answered

Create a gallery upon filtered excel data

(0) ShareShare
ReportReport
Posted on by 33

Good day,

 

I am looking for support regarding the following idea:

I do currently have a gallery that shows my orders. I built-in a search, so I can look-up names or order numbers and implemented a details-page as well. All works great!

 

I would however like to introduce tabbed views to my existing gallery, splitting the gallery into two views: "payed" and "not payed". That however means I would somehow have to filter the source data that feeds the gallery between "payed" and "not payed". The field, containing information about the status of payment should not be visible, however the gallery shall be filtered by it.

 

How would I go about this in the best way?

 

Very much looking forward to your replies!

 

Greetings

 

Nils

Categories:
I have the same question (0)
  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi @Nils_PowerApps ,

    As usual with PowerApps, there's a couple of ways to achieve the same result.

    One method is to create multiple galleries on top of each other and set their visibility to be dependent on the tab that has been selected - this however creates multiple simultaneous queries to the source as the galleries are still there, just not visible all at the same time.

    Another way is to set the Filter() statement of one gallery to be dependent on the tab that's selected - you can update a variable each time a tab is clicked to track this and use the variable to adjust your Items: property with an If() statement.

    To test, add three buttons and change the button text and Onselect: properties respectively to;

    Button1 text: All

    Button1 Onselect:

     

    UpdateContext({varFilter: "All"})

     

    Button2 text: Payed

    Button2 Onselect:

     

    UpdateContext({varFilter: "Payed"})

     

    Button3 text: Unpayed

    Button3 Onselect:

     

    UpdateContext({varFilter: "Unpayed"})

     

    Then set your gallery Items: property to;

     

    Switch(varFilter,
     "Payed", Filter(dataSource, payedStatusColumn="payed"),
     "Unpayed", Filter(dataSource, payedStatusColumn="unpayed"),
     dataSource
    )

     

    This will filter if either of Button2 or Button3 are pressed and default to no filter for anything else (which includes if Button1 is pressed)

    Hope this helps,

    RT

     

  • Verified answer
    Nils_PowerApps Profile Picture
    33 on at

    Thank you @RusselThomas, the approach of filtering one data source by whatever categorie is selected sounds much better than overlaying multiple galeries.

     

    I´ll be out of office for 48 hours, so I can´t test it right now unfortunatley, but I´ll try it out and report back. Thanks very much so far!

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard