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
abm
Super User III
Super User III

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 blogPower Automate Video Tutorials

View solution in original post

3 REPLIES 3
abm
Super User III
Super User III

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 blogPower 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!

abm
Super User III
Super User III

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 blogPower Automate Video Tutorials

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (75,470)