Expiring training resource alert - filter out recertified records?
Summary:
We have a custom alert created to notify learners/team leaders of Required training that is about to expire in 30 days, here are our filters:
NOT EXISTS (SELECT 'X' FROM ANC_PER_ABS_ENTRIES WHERE 1 = 1 AND PERSON_ID = ${ assignedToId} AND ABSENCE_STATUS_CD NOT IN ('ORA_WITHDRAWN','SAVED') AND APPROVAL_STATUS_CD IN ('APPROVED') AND ${AlertFilterUtils.getCurrentDate()} BETWEEN START_DATE AND END_DATE)
trunc(${expirationDate}) = ${AlertFilterUtils.addDays(AlertFilterUtils.getCurrentDate(),30)}
The issue we're running into is that if this user has a renewal assignment created through an initiative, then it's very possible the team member will have already completed the training a second time (before the expiration date), and still recieve this email alert.