Inbetween days calculation

1
I'm working on leave applying my scenario is if i already applied leave i should not be able to apply for the same day. its working for start date and end date but if I'm applying leave inbetween the start date and end date it should show leave already applied but it's not working soo!!.. How could i resolve this 
asked
2 answers
0

Hi Ram

You could add a validation on your save microflow which checks whether selected leave day is not on the same day.

Example :  $SelectedLeaveStartDate=[%CurrentDateTime%]

If above condition is true then Show a validation message ‘Start Date cannot be the same as Today!’

answered
0

Hi Ram,

 

as with numeric values you can use relational expressions to compare dates.

 

So in your example you could check if there’s already a leave planned (in database) for the selected date with a XPath constraint looking something like:

 

[$SelectedLeaveDate >= StartDate and $SelectedLeaveDate <= EndDate]

 

or:

 

[$SelectedLeaveDate >= StartDate]

[$SelectedLeaveDate <= EndDate]

answered