cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jovalles
Helper II
Helper II

Automated Vacations Flow (Sub) Available Days

Hello all,

 

Thanks for take your time and reading.

 

I have almost complete my flow but i need automated the real number of availables days. I explain bit better, all my useres have 15 days avalables to take, when they request for example 5 days i need in the flow that chek on the list where available days are 15 and substrack that 15-5 new available days = 10 so i dont know how to do for use sub() between 2 differents SP List. all this on sharepoint online and microsoft flow.

1 ACCEPTED SOLUTION

Accepted Solutions

Sure:

 

1- List 1  (where the user request the vacation) (user: person type) (totaldays, Calculated field , substrack datein-dateout)

list1.PNG

2 - List 2 Same site ( register alwais  exist )

 

list2.PNG

 

Flow:

 flow 1.PNGflow2.PNG

 

 

flow 3.PNG

 

Formula : 

sub(body('Get_item')?['availabledays'],inttriggerBody()?['totaldays'])

View solution in original post

6 REPLIES 6
Jcook
Super User
Super User

Hello @Jovalles ,

 

Try using a 'Data Operations  - Compose' Action for each list to grab the value needed. (in your case this would be 'days')

 

Than use a Third Compose to do the calculation with an expression to get the value you are looking for.

 

--Josh

 

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi,

 

Ty for your HElp, can you give me a bit more of details i'm not an expert on microsoft flow, i was thinking that was easiest this flow 

@Jovalles ,

 

Yes for sure, can you please share a screenshot of your flow, so i have something to work with, and better understand how your workflow is working.

 

Thanks

 

--Josh

 

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Sure:

 

1- List 1  (where the user request the vacation) (user: person type) (totaldays, Calculated field , substrack datein-dateout)

list1.PNG

2 - List 2 Same site ( register alwais  exist )

 

list2.PNG

 

Flow:

 flow 1.PNGflow2.PNG

 

 

flow 3.PNG

 

Formula : 

sub(body('Get_item')?['availabledays'],inttriggerBody()?['totaldays'])

Awesome, sorry about the late response. I will try to replicate best I can and have a solution for you very soon

Thanks

-Josh

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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





@Jovalles 

Please take a look at my POC. I have 2 SP lists. One for Remaining Days, the other for Total Days. I am using the compose action like i said in my first reply. Here is dome screenshots.

Please read all the highlighted text.

Pic1.pngPic2.pngPic3.png

I hope this helps!

 

--Josh

 

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


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

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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.

Users online (1,255)