cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alhilo
Helper III
Helper III

Count items in sharpoint list

Hi everyone

 

I have a list that contains the following columns

 

- Employee Number

- Employee Name

- Department e.g HR, Finance...etc

- Status. e.g not start, pending, complete ...etc

 

I want a flow that count the items like the following example

StatusHRFinanceTotal
not start10212
Pending20323
Complete30434
Total60969

 

with million thanks

 

13 REPLIES 13
Hardesh15
Super User II
Super User II

@alhilo 

 

Please use Get Items and then Apply to each. For counting you need a variable of type int.

 

Steps-

1. Get items

2. Initialize a variable- Int type

3. Apply to each- supply value from get items

4. Inside apply to each- Increment variable by 1.

 

you can manager status column in get items filter query/filter array for each department

 

Thanks

Hardesh

Thank you for this

 

Please note that I need also to send these numbers(count) in a table through email. and the table should be in the body of the email 

 

 

Hi Everyone

 

would you please advise regarding my question

 

with million of thanks

@alhilo 

 

Have you tried steps given above? if yes please share screens.

 

Thanks

Hardesh

Yes, and i can't find the output count when want to chose in the body

 

https://ibb.co/MN90565


https://ibb.co/pdZJBbF

 

https://ibb.co/sCqPKHM

 

also, this is an error that i face

@alhilo 

 

Please share complete flow screen.

 

Thanks

Hardesh

alhilo
Helper III
Helper III

Here we go 🙂 

 

https://ibb.co/mDfp4hy

 

@alhilo 

 

After get items use apply to each action in that supply value from get items. Inside apply to each use increment variable.

 

You have initialized variable of type int but you your value is not typ of int (use zero )

 

Thanks

Hardesh

i face the below error

 

The operation 'Initialize variable' can only be used at top level.

 

@alhilo 

 

You need to use initialize variable action  out side loop . Can you please use Initialize Variable after Get Items action.

 

Thanks

Hardesh

the below photo shows what i did till now

 

would you please help me by sharing me a photo where i should do each step?

 

https://ibb.co/wcLGprL

 

Hi

 

Any update

 

with many thanks

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (942)