cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
breater
Level: Powered On

Update Row: Automatic adding numbers in the same row

Hello to all,

 

I'm working on a vacation-flow, where you can submit you prefered vacationtime in a Microsoft Forms and it automatically start an approval to the supervisor. In the Forms you enter the vacation start and the end date and the flow calculate the days between. Here is a picture how my Flow is working actually:

 

vacation-flow.JPG

 

I want to update the column in the following Excel-File after successful approval with the confirmed days in the "Taken Days"-Row. The Flow recognize the worker who request the vacation and find his row in the Excel-File.Then it updates the column "Taken Days" with the above calculated days. (That works already!)

 

holiday-flow.JPG

 

But if the worker get two times holidays approved (for example first time 6 days and second time 10 days) the second holidays overwrite the first 6 days. In the end the Excel-Column contains just 10 days and not 16.

 

Is there any possibilty to add up the same column after each request?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Update Row: Automatic adding numbers in the same row

Hi @breater ,

 

Please see below steps.

 

Here I am triggering the flow manually and intialised couple of variables. In your case these steps might be different.

 

hol1.png

 

Next step we need to filter by name (assuming name is unique otherwise you need to use a unique id or something to filter) to find the existing taken days. See below.

 

hol2.png

 

Next we need to update the row and add the approved days with existing taken days.

hol3.png

Below is the expression I am using to add the current row value with new value.

add(int(variables('CurrentHolidaysTaken')),body('Parse_JSON')?['HolidaysApproved'])
 
If you need any further help please let me know.
 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
Super User
Super User

Re: Update Row: Automatic adding numbers in the same row

Hi @breater 

 

Did you tried using Get Rows and find the match? Once you find the match store the value in a variable. Then when you do the update you can do the add expression to calculate the days.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



breater
Level: Powered On

Re: Update Row: Automatic adding numbers in the same row

Hi @abm 

 

I'm not sure which match you mean? And how does an add expression looks like. I'm trying this for days but nothing works. Maybe you have an example for me 🙂

 

Thanks!

Highlighted
Super User
Super User

Re: Update Row: Automatic adding numbers in the same row

Hi @breater ,

 

Please see below steps.

 

Here I am triggering the flow manually and intialised couple of variables. In your case these steps might be different.

 

hol1.png

 

Next step we need to filter by name (assuming name is unique otherwise you need to use a unique id or something to filter) to find the existing taken days. See below.

 

hol2.png

 

Next we need to update the row and add the approved days with existing taken days.

hol3.png

Below is the expression I am using to add the current row value with new value.

add(int(variables('CurrentHolidaysTaken')),body('Parse_JSON')?['HolidaysApproved'])
 
If you need any further help please let me know.
 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,992)