Notifications
Announcements
I have a text box to show the number of items in a gallery and I used the formula Text(CountRows(Gallery.AllItems)). The problem is that the value in the text box does not update. I have refreshed my dataset multiple times but it is not changing. What might be wrong?
Thanks.
Hi @Natido
To show the value in the Text Input you need to reset the text input and change the default property of the text input.
The below example counts all items in a gallery and display the total count in text box.
1. Count all items and store it in a variable and reset your text input
Set(TotalCount,CountRows(Gallery2.AllItems)); Reset(TextInput1);
2. On Defaut property of the text input paste the below code
TotalCount
If your datsource is updated, should work with just: CountRows(Gallery2.AllItems)
Try setting a temporary button with onselect:refresh(Gallery)To try it out.
@Natido
Please accept the solution if the suggested solution is working.
@Marshal_Jerome your solution works but I did not get exactly what I needed. With power apps, it looks like you will not get the actual count once the gallery exceeds a 100 rows I found this post by Matthew Devaney that gave more insight: https://www.matthewdevaney.com/count-the-rows-in-a-power-apps-gallery-with-allitemscount/
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268