cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

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
ProtivitiDan
Level: Powered On

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.

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. 

ProtivitiDan
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,854)