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 / Query SharePoint metad...
Power Apps
Answered

Query SharePoint metadata and show it in Power Apps

(2) ShareShare
ReportReport
Posted on by 81
Hello everyone, 
 
I have an application that a vendor built for a company and there's a field that stopped showing accurate data at 500 records firstly, then got stuck in 2000 when increased the limit in power apps from 500 to 2000. I'm very aware of delegation limits in Power Apps and SharePoint, but I'm wondering if there's any way we could query the metadata in SharePoint to reflect the total number of rows in a list that is over 20k rows, please see image below. That image is from the 'Site Content' section in SharePoint, so, I'm wondering if there's a way to query that number in the Items column for the Checklist list, and show/reflect this number in a label/text control in Power Apps. 
 
Thank you very much for your help in advance.
 
Regards :)
 
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    You can do it with a Flow - it looks like this
     
     
    In Power Apps you would set a Variable on the returned result of the Flow
    UpdateContext(
       {
          varListCount:
          FlowName.Run(
             "YourListName"
          ).listcount
       }
    )
    
    
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like♥.
    Visit my blog
    Practical Power Apps    LinkedIn   
     
     
  • Palaces Profile Picture
    81 on at
    Many thanks for your support, @WarrenBelz! Do you know if there's a way to accomplish this directly from Power Apps without using a flow?
     
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    Maybe with a Custom Connector (which can be complex to construct and needs a Premium Licence for all users of the app), but what is wrong with the very simple Flow process ?
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like♥.
    Visit my blog
    Practical Power Apps    LinkedIn   
  • Arun K Rajan Profile Picture
    25 on at

    As you know You cannot get the total item count with CountRows() in Power Apps because of delegation (stops at 500/2000).

    Instead, you must fetch the ItemCount property of the list from SharePoint metadata.

    IF you follow this steps you will be able to get the count

     

    Go to Power Automate → New Flow → Instant cloud flow means trigger from power apps

     

    Add action: Send an HTTP request to SharePoint

    Site Address: your site (e.g. https://YourTenanet.sharepoint.com/sites/YourSite)

    Method: GET

    Uri:_api/web/lists/GetByTitle('Checklist')?$select=ItemCount

     

     

    1. Add action: Respond to Power Apps

    2. Add output: ItemCount =body('Send_an_HTTP_request_to_SharePoint')?['d']?['ItemCount']

    3.  Save the flow (For Example name it GetChecklistItemCount).

     

    Step 2 – Call Flow from Power Apps

     

    In your app, set a variable with the count:

    Set(
    varChecklistCount,
    GetChecklistItemCount.Run()
    );
    
    Step 3 – Show the Count
     

    Bind your label to the variable:

    Text(varChecklistCount)
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    That seems to be exactly what I posted.
  • Arun K Rajan Profile Picture
    25 on at
    Hi,
    The best approach will be to use the power automate like previously said, other work around will be if you have indexed column on your SharePoint list, Instead of SP ID we can use that Indexed field and add conduction this will avoid delegate issues .
     
    Regards,
    Arun 
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    That does not allow for deleted records.
  • Palaces Profile Picture
    81 on at
    @WarrenBelz@Arun K Rajan thank you very much for providing the solutions!

    The downsize of using roles is that there are more than one field where the data needs to be updated, this means I'll need a flow per each field, apologies for not including this in my original post, I just realize I said one field. This is why I was trying to find a way to do this directly from Power Apps and not from flows. Also, the deleted records are not needed to track in the records count. If you can think of any way this can be accomplished directly from Power Apps that'd be great, if no, I can just create a flow per each field.
     
    Thank you very much!
  • WarrenBelz Profile Picture
    155,283 Most Valuable Professional on at
    If you are never going to delete records (and never have since the List was created), then the number of records is easy
    First(
       Sort(
          SPListName,
          ID,
          SortOrder.Descending
       )
    ).ID
    This will present the newest 2,000 (or whatever your Data Row Limit is) records in descending order (sorting by ID is Delegable and you can also use Created ) and the ID of the first record is the newest and the total number of records.
     
    If however you have deleted some in the past (I will use a random number 45 below), but will not in the future you can set a "line in the sand". Get the total present number of records directly in Site Contents in SharePoint, and subtract it from the newest ID and then you can do this
    First(
       Sort(
          SPListName,
          ID,
          SortOrder.Descending
       )
    ).ID - 45
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn   
     
  • Palaces Profile Picture
    81 on at
    Thanks @WarrenBelz
    This is a good work around, however there are records that are deleted from time to time, and accuracy is needed. it's interesting we can make a http request from a flow but not from the app itself.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard