Referential Field
A referential field is a reference to a field in a related object. For example, in the Sample Order Processing System, the Order object has a customer field that "looks up to" to the Customer object.
Because of that lookup relationship, customer can be used to reference a field in associated Customer record. using dot notation. For example:
- customer.credit_rating
Here, the customer field in the current Order record points to the target Customer record, and the value of the credit_rating field in that record is used.
It is also possible to chain the lookup references, like this:
- customer.state.tax_rate
In this example, the state field in the customer object looks up to hypothetical tax table, where tax rates are stored. Things are never that simple, of course, but the example shows references can be chained, so long as the lookup relationships exist.
- Considerations
-
- Referential fields can chain to arbitrary depth.
- Referential fields are available for use in these contexts: