Get Count of records from Common Data Service Connector in Canvas Power App
Like in Dynamics 365, you see a total number of records under a view. And you want similar in a Canvas PowerApp too.
Here’s a simple tip to do so –
CountRows() method
It’s pretty simple. Using CountRows(source) method, you can get the count of records in the Source. In this case, it’s the CDS entity Accounts.
To flourish how I display the count, I use the Concatenate() method and then use CountRows() inside it first show the text and then the actual count.
Please note that this goes without filtering out any criteria and straight count of how many records the connection has. Your gallery could use more filtering to display lesser records if specified that way.
Handle Delegation
However, you need to handle a few things if you’re aware that your dataset is large.
Using this formula will give a warning:
And the general help offered is this –
Refer this article to understand more: https://powerapps.microsoft.com/en-us/blog/powerapps-data-row-limit-for-non-delegable-queries/
Hope this helps!!