Skip to content

@provided_at

Info

New in Atfinity 17.

Description

@provided_at returns when the value of a field was set, as a date and time you can pass to the date operators. Write it at the end of a field path, including one that starts with OLD., which then gives you when the value in the previous state of the instance was set.

The moment recorded is the last time the value changed, not the first time it was given, and a value a rule calculates carries the time of that calculation. If nothing is on record, the result is unknown.

A provenance operator attaches to a field path and to nothing else. Expressions such as (p.first_name + ' ' + p.last_name)@provided_at, CASE.state@provided_at and COUNT(p.accounts)@provided_at are rejected when the rule is validated.

Example

p is Person
DAYS_BETWEEN(p.passport_number@provided_at, TODAY()) > 365

The passport on file was last confirmed more than a year ago, so the case asks for it again. Reading the age of a single field this way is more precise than the age of the whole instance, which changes as soon as anything on it is touched.