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 / How to get count of ch...
Power Apps
Unanswered

How to get count of checked checkbox in Responsive Screen with Gallery?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have set up Responsive Screen with Gallery using Raza's video link. I have only one change in that. We needed selection checkbox. When user select one, We need to enable edit button which is out side of the gallery. If user selects more than one button, we need to disable that back.  I have tried below code for the checkbox on-select/on-check/on-uncheck event:

 

 

 

If(CountRows(Filter(Gallery4.AllItems,Checkbox1.Value))= 1, UpdateContext({EnableEditButton:true}),UpdateContext({EnableEditButton:false}))

 

 

 

 

For button, I am setting Display mode to "Enab;eEditButton" variable. 

But the issue with CountRow() function is it gives me all the items count and not where the checkbox is checked. Can someone points me how can I get count of items where checkbox is checked? 

Categories:
I have the same question (0)
  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

    Do you want to disable the button if the numbers of checkboxes are greater than 1?

    I think the problem is not about CountRows() function.

    You can set the DisplayMode property of button as:

    If(CountRows(Filter(Gallery5.AllItems,Checkbox1.Value))>1,DisplayMode.Disabled,DisplayMode.Edit)

    vmingkzmsft_0-1690338579618.png

     

    vmingkzmsft_1-1690338617691.png

     

    Best Regards,
    Kyrie

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi. Thanks for replying. I know the code you provided works if we use simple gallery and put checkbox inside it. But it is not working if we create responsive gallery that is mentioned in the question. when I get the count rows displayed in the label as you mentioned, it is giving me all items count as answer instead just checked items. Can you create gallery as showcase in Raza's video link. and verify the issue?

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 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard