EntityField
An EntityField represents the attributes of an Entity. For example, Person_entity contains EntityFields such as FIRSTNAME, LASTNAME, and DATEOFBIRTH.
Each EntityField provides configurable properties, some static and some process-driven.
Commonly used properties are:
title: The text shown for the field in the client, for example in a table column or as a label.contentType: The ADITO data type. This must fit the connected database type and influences client behavior.mandatory: Enables the built-in validation that blocks saving while the field is empty.linkedContext: Configures the Context that should be opened when the field represents a linked business object.
Value and DisplayValue
Every EntityField can have two kinds of values:
value: The internal value of the EntityField used for storage, calculations, dependencies, and related logic.displayValue: The value displayed in the client. If nodisplayValueis defined, thevalueis displayed.
Assignment
Both value and displayValue can be assigned in different ways:
-
Via RecordContainer: The value is filled by the RecordContainer. How the value is loaded depends on the type of the RecordContainer.
-
Via JDito processes: Calculate using
valueProcessordisplayValueProcess, which can contain JDito code that loads the value for the current dataset. See valueProcess. -
Direct assignment via
neon.setFieldValue(): Set the value from a different JDito process. Should only be used for special use cases, not for loading data.
The priority of these value sources depends on the record state:
- VIEW: If the field is mapped to the RecordContainer, the value from the RecordContainer is used and the
valueProcessis not executed. - EDIT/NEW: The
valueProcess/displayValueProcessis prioritized.
Access
In most cases, the value of an EntityField can be read using vars.get("$field.FIELDNAME") and the displayValue with vars.get("$field.FIELDNAME.displayValue").
A more detailed explanation of the different ways to access the value can be found here: Accessing the value of an EntityField.