You probably are doing something wrong.
You should be able to find number of absence taken in a specified period.
Please refer below link (It has a pdf which has many FF Examples):
Hope this helps!
Thank you so much, in fact, I took reference for your attached doc to create this fast formula, but still having problem to get the correct number day. I have try to modify the formula in different ways but still cannot get the correct no. of day, would you please help to have a look below to check where is the problem, many thanks!
if((l_absence_type_id=ANC_ABS_ENTRS_ABSENCE_TYPE_ID) AND (ANC_ABS_ENTRS_ABSENCE_STATUS_CD <> 'ORA_WITHDRAWN'))
l_days_duration = ANC_ABS_ENTRS_DURATION
l_days = l_days_duration + l_days
l_total_days = l_days + l_new_duration
if(l_total_days > 3 )
ERROR_MESSAGE = 'The leave entitlement has been used up as employee are entitlement to the leave per employment'
RETURN VALID, ERROR_MESSAGE
Can you add some log statements to find out what is the value returned for l_total_days and l_days
I have tried to return the value for l_total_days and l_days when apply a 2 days absence,
And I have checked that there are only 7 days absence records with the specified absence type with status <> withdrawn. Please advise, thank you very much!