cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
breater
Frequent Visitor

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

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!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

3 REPLIES 3
abm
Super User
Super User

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!

Learn more from my blog
Power Automate Video Tutorials
breater
Frequent Visitor

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!

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!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,341)