2

I've built a SharePoint calendar that I'm using to track employee vacation time. The employee logs into a PowerApp, enters their information (including the amount of hours they are requesting off) and clicks a submit button. When the submit button is clicked a flow is triggered which generates a "Send an Email with options" to obtain the manager's approval.

Beginning of Power Automation

What I'm trying to do is total the number of hours that an employee has already taken off for the current calendar year. I need an action that will reference the same list and find all items where the:

  1. Start Date is in the current calendar year
  2. Employee Name is the same as the employee requesting the time off
  3. Status = Approved

And return the sum of the Total Hours Used column for the approved entries for that particular employee.

SharePoint List showing filter fields

The idea is that the email that is sent to the manager should tell the manager how much time the employee has been approved to take off so far this year.

Send Email with Options

I started to construct a Get SharePoint Items action, however, I'm not sure if it will work. Here is what I have:

Get Items

Anyone have any thoughts?

Joe Cambareri
  • 115
  • 2
  • 13

1 Answers1

0

You have to iterate through all the items & sum it up using Apply to each, Compose and Increment variable pieces together. Read more

enter image description here

For detailed learning - Iterate and get all items from a SharePoint Large List or Library using Microsoft Flow (no-code solution)