I have a Process as follows.....
Inputs are: Employee, NP_Enquiry_Date, LeaveAssignment
ThisLeaveAssignment.UsedToENQUIRY_DATE=
SUM AbsenceApplicationEvent.EventDays_Temp WHERE
(
AbsenceApplicationEvent.ob_Application.ob_Employee = Employee AND
AbsenceApplicationEvent.ob_Application.Status <> 'CANCELLED' AND
AbsenceApplicationEvent.ps_LeaveType = ThisLeaveAssignment.ps_LeaveType AND
AbsenceApplicationEvent.DateTempEnd <= NP_Enquiry_Date.Enquiry_Date AND
(
(ThisLeaveAssignment.EndDateDefined = 'Yes' AND ThisLeaveAssignment.SaldoMode='Yes')
OR
(ThisLeaveAssignment.EndDateDefined <> 'Yes' AND AbsenceApplicationEvent.DateTempEnd>=ThisLeaveAssignment.StartDate)
OR
(ThisLeaveAssignment.EndDateDefined = 'Yes' AND AbsenceApplicationEvent.DateTempEnd < ThisLeaveAssignment.EndDate)
)
)
For some weird reason I am continually seeing this error in the Aware Logs...
Unable to find ThisLeaveAssignment.EndDate in aggregate operation SUM
I have spent hours testing and have pinned it down to this part.....the last OR
(ThisLeaveAssignment.EndDateDefined = 'Yes' AND AbsenceApplicationEvent.DateTempEnd < ThisLeaveAssignment.EndDate)
I have tried changing the order of the ORs and the order of testing. I even added the This just in case.....
But still gives the error.
Maybe I am to close to it and cannot see the forest for the trees.
Any ideas or suggestions would be welcomed.... 🙏🏼