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

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'])

View solution in original post

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

Users online (70,818)