Annoying Unable to FIND Issue.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Annoying Unable to FIND Issue.

Post by customaware »

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.... 🙏🏼
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2458
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Annoying Unable to FIND Issue.

Post by Jaymer »

1. No need for the THIS unless you're finding another LeaveAssignment (i understand u were just trying stuff)

2. Possible that there's NO LeaveAssignment on this particular run?

3. Insert a LOG2 CONTEXT to see what all is in context. make sure there's only 1 LeaveAssignment
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2407
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Annoying Unable to FIND Issue.

Post by customaware »

Thanx Jaymer,

I only added the This just in case it made any difference.

there is Definitely a LeaveAssignment being passed to the process

I will check out the LOG2 CONTEXT suggestion.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
ACDC
Posts: 1143
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Annoying Unable to FIND Issue.

Post by ACDC »

Unable to find ThisLeaveAssignment.EndDate in aggregate operation SUM
I had something similar going on and solved it by creating a new EndDate attribute.(delete the existing one or create EndDate2)

There must have been something lurking in the upgrade process to the new V9 version, maybe it's related.
Post Reply