IS_BEYOND_LAST_DAYS
IS_BEYOND_LAST_DAYS:
arg: { arg } # required
offsetDays: { offsetDays } # required
Description
The IS_BEYOND_LAST_DAYS operation checks if a DateTime value, provided as the argument arg, is strictly earlier than a date calculated by subtracting a specified number of days (offsetDays) from the current day (today). The comparison is based on the current date at UTC midnight. It returns a Boolean value: true if the arg DateTime is beyond the last offsetDays, and false otherwise.
Parameters
-
arg(Operation<DateTime>, required):- Specifies the
DateTimevalue to be checked. - This should be an operation that resolves to a
DateTimevalue, such asFIELD,EXTRACT,DATE_TIME_FROM, etc.
- Specifies the
-
offsetDays(number, required):- Specifies the number of days to subtract from the current date for the comparison.
- Must be a non-negative integer.
Return Type
Examples
-
Checking if a date field is beyond the last 30 days:
IS_BEYOND_LAST_DAYS:
arg:
FIELD:
path: CA10__lastModifiedDate__c # Assume this field returns a DateTime value
offsetDays: 30This example checks if the date in the
CA10__lastModifiedDate__cfield is earlier than 30 days ago. -
Using
IS_BEYOND_LAST_DAYSin a Condition:- status: INCOMPLIANT
currentStateMessage: "The resource has not been modified in the last 90 days and is considered stale."
remediationMessage: "Review and update the resource or consider archiving it."
check:
IS_BEYOND_LAST_DAYS:
arg:
EXTRACT: CA10__lastModified__c # Assume 'CA10__lastModified__c' is an extract returning DateTime
offsetDays: 90This condition flags a resource as
INCOMPLIANTif its last modification date, obtained from theCA10__lastModified__cextract, is beyond the last 90 days.
See more details in: