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

Community site session details

Session Id : ocBJ9QuyyrJXjERawNBtla
Power Automate - Using Flows
Unanswered

Building an Vacation request flow

Like (0) ShareShare
ReportReport
Posted on 6 Jun 2023 15:14:08 by 9

Hi folks.

 

I built a vacation request APP and I am having issues on substracting the total vacations left field from the amount of days requested adn sum the total of vacation day to the new days requested (Both fields are numbers in sharepoint). 

 

Here are the sharepoint lists:

Employee: It has all the fields for total of days of vacations taken, total of days of vacation left:

Pepelucho78_0-1686063707684.png

 

Leave Request: it stores leave date, return date, total days requested:

Pepelucho78_1-1686063892339.png

 

Once the requequest its submitted on powerapps, the approval status are changing and when its finally approved I need to do folowing changes on the Employee list:

1. Sum the total days requested to the DateVacTaken

2. Substract the total days requested to the DateVacLeft

 

From this point I use a flow in power automate to do the calculations but everything is giving errors

Any ideas on how to do these two math operation using the sharepoint columns.

 

Thanks

Jose Luis

 

  • ArchitectMadhan Profile Picture
    1,580 on 06 Jun 2023 at 16:23:02
    Re: Building an Vacation request flow

    @Pepelucho78, I dont think you need to have the apply to each function in your case. Here is the step by step process to update the Employees DaysVacTaken and DaysVacLeft.

     

    1. Flow Triggering : On Update Item in Leave Request (SP List) -> In advanced option check the value of "Status eq Approved"

    2. Get Item from SharePoint list "Employees" based on the Employee ID in the Leave Request update item.

    3. Compose NewDaysVacLeft-> DaysVacTaken - DaysRequested

    4. Compose NewDaysVacTaken -> DaysVacTaken + DaysRequested

    5. Update Item in SharePoint Employees list :

         Set DaysVacTaken = NewDaysVacTaken 

         Set DaysVacLeft = NewDaysVacLeft

    Now, you are good to go. Hope you have understood the steps involved.

    Please accept this as Solution, If it is helpful for you.

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow
Loading complete