web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Simple Count in Power ...
Power Apps
Unanswered

Simple Count in Power Automate and Sharepoint

(0) ShareShare
ReportReport
Posted on by 3

I have a Sharepoint list that gets updated throughout the day by users on a PowerApp. In it, I have data coming in about residents from three facilities. Residents come and go all the time, so I have created one single line of text column for "Facility" names and another boolean column for "Current". 

 

I would like to run a report daily count on how many rows in the Sharepoint list of current residents in each facility, and put it in a separate list called "Daily Count".

 

I've figured out that in ODATA, `(Current eq true) and (Facility eq 'Facility 1')` should filter out all the non-current residents of a given facility. I just want to take that filtered data, count the number of items/rows, and put that into the new list. 


When I try the `length(outputs('Get_items')?['body'])` of the body of the list, it tells me that it's an Object and I can't take length() of an object. When I do `length(createArray(outputs('Get_items')?['body']))`, it returns a single result. 

 

I don't want to be running some sort of recursive loop to go through all 500+ residents one by one, because it seems wasteful and takes a long time.


What am I missing?

 

Thank you.

Categories:
I have the same question (0)
  • Abhilash_Swain Profile Picture
    901 on at

    Hi @ezrabutler,
    If I understood your requirement correctly,  you want to show something similar to the below screenshot.

    Filter out data with "(Current eq true) " and then use the below logic to show.
    SP List contains - Emp ID and Reporting Manager  and My power Apps shows count for each Manger 

    Abhilash_Swain_0-1641193820200.png

    Abhilash_Swain_1-1641193842500.png

     

    For this, I use GroupBy in "Items" of the gallery. (Employee_office  is my source, "Manager"- Existing column in source, "total_Count"- is the group by column name.)

    Please Note:- total_Count here represents a table stored under the column.

    Abhilash_Swain_2-1641194025953.png

    To display the count:-  Select Subtitle- Go to text and use the count formula to display no of rows in the group by.

    Abhilash_Swain_3-1641194188537.png

     

     

     

    Hope this will help you. 
    Give a like or accept as a solution or share your concerns if this is not helping.

     

  • Community Power Platform Member Profile Picture
    on at

    @ezrabutler 

    Try using this instead:

     

    length(body('Get_items')?['value'])

     See here for more info

    https://tahoeninjas.blog/2019/07/04/how-to-count-number-of-items-returned-by-sharepoint-getitems-action-in-flow/

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard