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 / CountRows not working ...
Power Apps
Answered

CountRows not working with container in gallery

(0) ShareShare
ReportReport
Posted on by 181

Hi,

 

I have a gallery that has a container within the template. Within the container is a checkbox.

I am trying to count the rows that are checked. For some reason the CountRows function does not work as expected when using the container. If there are 5 rows in the gallery and none are checked then CountRows shows 0, but even if only 1 checkbox is checked then CountRows returns 5. Removing the checkbox from the container lets CountRows work properly again. 

 

is this a bug or am i missing something?

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

    @asafweis - it is not possible to access controls inside a container. Removing the Checkbox from the container was the correct action.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • asafweis Profile Picture
    181 on at

    Is this only for containers in galleries? 
    I use container quite often and haven’t come across this before. 

  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @asafweis as far as I have seen, inside a Gallery or inside the DataCard of a Form.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard