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 / Checkbox Single Column...
Power Apps
Answered

Checkbox Single Column Gallery Filter

(0) ShareShare
ReportReport
Posted on by 42

Hi All,

 

I have a printer supply information screen (sharepoint list based), with a printer selector on the left (which uses a seperate sharepoint list) and a printer hub information in the center. Selecting a printer on the left will populate the gallery screen within the printer hub information screen and tell me what supplies are assigned to that printer. I use the following formula below to sort the gallery field based on the printer choice and if supplies are in stock. The supplies column can have 3 different availability status which are Stock, Used and Discarded.

 

Filter(Filter('Printer Inventory Stock', 'Printer Name' = Gallery2.Selected.Title),Availability.Value = "Stock")

 

I've got three check boxes which are - 'Used', 'Discarded' and 'All' as by default it will show me everything in 'Stock'. I'm trying to figure out how to sort the gallery field to show me the results based on if these checkboxes are ticked, while making sure that it's giving me results based on the printer selected on the left. I've tried nesting filters within filters but I can't figure out a way to evenly sort this out.

 

Any help appreciated thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Specthildur - assuming this is the same app as described in your other post, I will modify the other solution to be applicable to this scenario: https://powerusers.microsoft.com/t5/Building-Power-Apps/Filter-Gallery-based-on-another-Gallery/m-p/2569693#M635887 

     

    One method:

     

    1. Create another Gallery control with a Title only layout

    2. In the Items property of this Gallery control, enter:

     

    Table(
     {Availability: "Stock"},
     {Availability: "Used"},
     {Availability: "Discarded"}
    )
    

     

     

    3. Insert a Checkbox control inside the Gallery (so that the control is duplicated per record).

    4. In the Text property of the Checkbox control, enter:

     

    ThisItem.Availability

     

    5. On the OnCheck property of the Checkbox control, enter:

     

    Collect(
     col_CheckboxSelection,
     ThisItem
    )

     

    6. On Uncheck property of the Checkbox control, enter:

     

    Remove(
     col_CheckboxSelection,
     ThisItem
    )
    

     

    7. On the Items property of the printer Gallery, enter:

     

    SortByColumns(
     AddColumns(
     Filter(
     'Printer Inventory Stock',
     'Printer Name' = Gallery2.Selected.Title,
     Availability.Value in col_CheckboxSelection
     ),
     "_Part_Choice",
     'Part Type'.Value
     ),
     "_Part_Choice",
     SortOrder.Ascending
    )
    

     

  • Specthildur Profile Picture
    42 on at

    Hi @Amik ,

     

    Thank you for help on my posts.

     

    Trying out your instructions seem to work great but I think I've broken it by selecting two check boxes. It's always filtering 'Used' items and 'In-Stock' items, although 'Discarded' items appear to disappear fine. Currently this is what is being shown when the gallery checkbox items are all unticked (as you can see both Used/Instock are filtered). 'Used' always seems to be there no matter but if you tick 'In-Stock' once and untick it will then always show that choice.

     

     

  • Specthildur Profile Picture
    42 on at

    Hi @Amik ,

     

    Seems like the issue was Modern Checkboxes, I tested on the classic checkbox and it works totally fine! Now I just want to set 'In-Stock' as default but should hopefully be able to do that myself. Thank you so much.

     

     

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Feel free to @ME if you need support on this topic.

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

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard