Regarding some values for activities in microflows

Hi, I have been working on project of vacation management for north seaship building . I have 3 doubts here, the image is shown here…. What can be the value for activity “Change variable: HoursRequested” as In output, We have to display the total hours of vacation requests.  What can be the value for activity “Change variable: Current date” ?  What can be the expression for 3rd “decision box: Last day”?  
1 answers

Some assumptions here. I assume that the request consist of a begin date and an end date. It seems you have to create a list for each workday. So you start with the first date, check if it is a weekend day and otherwise create the day and fill it with the working hours of that day. Then you change that date to the next day. You can use the addDays or addDaysUTC function for that. Check again if it is not a weekend and otherwise create again a vacation day.

The hourrequest you need to update each time a vacation day is created to keep count of the total hours. You could also use a list operation for that after the complete list is created.

That end split needs to check if the day you are currently working with does not exceed the enddate of the request. Let say I do a request for the 23th to the 27th of may. So your first day is the 23th. Then you do the adddays for the 24th etc.If you have created the 27th you need to stop because that was the end day of the request.