How do I create an autocomplete rule to set a default final close date for employees with terminated employment?

Here's an example of an autocomplete rule that defaults the final close date to a static date. This default date is valid for all employees with terminated employment, across the enterprise.

Screenshot of an autocomplete rule sample that defaults the final close date to a static date.

Here's an example of an autocomplete rule that defaults the final close date to a dynamic date. This default date is derived based on the employment termination date + n days.

An HcmParam global function isn’t available to directly get the termination date. So, you need to derive the termination date in the rule through the following logic:
  1. Get all the hrAssignRow variables for the given payroll assignment.
  2. For each hrAssignRow variable, check if the row is inactive.
  3. If it's inactive, find the row related to the actionCode variable.
  4. If the actionCode variable is EMPL_TERMINATE, derive the value of the terminationDate variable as hrAssignRow.EfectiveStartDate -1.

Screenshot of an autocomplete rule sample that defaults the final close date to a dynamic date based on the termination date + n days