For more information, please refer to this announcement explaining best practices for getting answers to questions.
Worker Termination Alert fetching all termination dates (Older ones also)
Summary:
Hello Everyone,
We have developed an alert using alert composer for triggering notifications when termination transaction occurs. But the issue is, we are getting multiple termination dates in the notification in case of Rehire/Global Transfer. Ideally we should be getting the latest termination date.
Content (required):
Resoucre : Worker
Filter Criteria:
EXISTS (SELECT 'X' FROM PER_PERIODS_OF_SERVICE PPOS WHERE PPOS.PERSON_ID = ${PersonId} AND PPOS.PERIOD_TYPE = 'E' AND PPOS.ATTRIBUTE2 = 'Y' AND TRUNC(ACTUAL_TERMINATION_DATE) between TRUNC(SYSDATE - 7) and TRUNC(SYSDATE) AND NOT EXISTS (SELECT 1 FROM PER_PERIODS_OF_SERVICE PPOS_OLD, PER_PERIODS_OF_SERVICE PPOS_NEW WHERE PPOS_NEW.PERSON_ID = PPOS_OLD.PERSON_ID AND PPOS_OLD.ACTUAL_TERMINATION_DATE + 1 = PPOS_NEW.DATE_START AND TRUNC(PPOS_OLD.ACTUAL_TERMINATION_DATE) between TRUNC(SYSDATE - 7) and TRUNC(SYSDATE) AND PPOS_NEW.PERSON_ID = PPOS.PERSON_ID))