cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

Re: DataTable row count

So, to summarize... a table object is not really a table for countrows.  Is that correct?  Also, its no good if you have over 500 items resulting in your filter, because it is subject to delegation.

 

Is there another way to do this to get a full count?

Highlighted
Advocate II
Advocate II

Re: DataTable row count

It's a shame we can't use DataTable1.Items as the input to the CountRows function. I have a fairly complex Filter formula in my table Items property. I have to copy that formula to the label where I want to show the count which is not good for maintainability.

Highlighted
Super User
Super User

Re: DataTable row count

Hi @ProtivitiDan 

I understand what you're saying - it would be much better if it were possible to access DataTable1.Items. Perhaps this is something that you could post in the ideas forum?

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

Here's something else you could try (although I've not tested it thoroughly). The gallery control exposes a property called AllItems. Therefore, you could add a gallery control to your screen and set the Items property of the gallery to your complex Filter formula. You can then set the visible property of your gallery to false, and then set the Items property of your data table to the AllItems property of the gallery. In your label, you can carry out a CountRows on the AllItems property of the gallery.

That way, there will only be a single instance of your complex filter formula, and it would reduce the risk of you updating the formula in the data table, and forgetting to update the CountRows formula in your label. 

Highlighted
Advocate II
Advocate II

Re: DataTable row count

Thanks @timl I posted an idea.

I have considered just switching to use a gallery control instead of the data table. There are advantages to each, and having the AllItems property is certainly an advantage of the gallery over the data table. Your suggestion is an interesting alternative in using both that I might explore more.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,995)