cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ahmednaseem
Frequent Visitor

How count the number of completed items within a gallery

I am building an Inspection App and I have a gallery items with radio buttons on each on an inspection screen. I want display the number of items that are checked every time an item is checked. Also is there a way to hide the next button until all the items are checked. 

1 ACCEPTED SOLUTION

Accepted Solutions
Power Apps
Power Apps

Re: How count the number of completed items within a gallery

You can check the number of items that have a selection in the radio button from the AllItems property in the gallery:

CountRows(Filter(Gallery1.AllItems, !IsBlank(Radio1.Selected))) & " of " & CountRows(Gallery1.AllItems) & " completed"

You can use a similar logic to determine when to enable the Next button:

If(
    CountRows(Filter(Gallery1.AllItems, !IsBlank(Radio1.Selected))) = CountRows(Gallery1.AllItems),
    DisplayMode.Edit,
    DisplayMode.Disabled)

Hope this helps! 

View solution in original post

2 REPLIES 2
Power Apps
Power Apps

Re: How count the number of completed items within a gallery

You can check the number of items that have a selection in the radio button from the AllItems property in the gallery:

CountRows(Filter(Gallery1.AllItems, !IsBlank(Radio1.Selected))) & " of " & CountRows(Gallery1.AllItems) & " completed"

You can use a similar logic to determine when to enable the Next button:

If(
    CountRows(Filter(Gallery1.AllItems, !IsBlank(Radio1.Selected))) = CountRows(Gallery1.AllItems),
    DisplayMode.Edit,
    DisplayMode.Disabled)

Hope this helps! 

View solution in original post

Highlighted
ahmednaseem
Frequent Visitor

Re: How count the number of completed items within a gallery

Thanks @CarlosFigueira . That is what I am looking for.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,655)