Field expression – reading a field of a record¶
The field expression reads the value of a field – of the current record or of a record linked to it through a relationship. It is the most frequently used expression type.
1. At a glance¶
| Purpose | Returns the current value of a field |
| Typical use | Showing or comparing field values, operands of formulas, the field side of a query clause |
| Returns | The value of the field, with the field's data type |
| Related | Aggregate (values of several related records), Sub Query (values of any records) |
2. Settings¶
| Setting | Meaning | Default |
|---|---|---|
| "Relationship" | Where the field is read: "(None) [Current context]" reads the current record, a relationship reads the record linked through it | "(None) [Current context]" |
| "Field" | The field that is read. The list shows the fields of the current entity, or of the related entity when a relationship is selected. | – (required) |
Usually you do not open this editor at all: picking a field in the quick reference list of a setting (section 6 of the overview) creates a field expression.
3. Behaviour¶
- The value is read from the record as it is at that moment, including changes in a form that have not been saved yet.
- Without a current record the expression returns an empty value.
- With a relationship, the field is read from the record linked through that relationship. Use relationships that lead to one record ("to one"). For values of several related records, use an Aggregate expression.
- The field must belong to the entity the expression is evaluated for (or to the related entity). If it belongs to another entity, the result is empty, without any message. This happens, for example, when a stored expression of entity A is used in a form of entity B.
In queries¶
On the left side of a query clause, a field expression names the field that is compared in the database. On the right side, a field expression is special: it compares two fields of the same searched record, see Queries.
4. Examples¶
Status of a ticket: Relationship "(None) [Current context]", field "Status".
Name of the customer of a ticket: Relationship "Customer" (ticket → customer, to one), field "Name".