Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Building an Vacation request flow

(0) ShareShare
ReportReport
Posted on 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 at
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow