Skip to main content

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:

  1. value: The internal value of the EntityField used for storage, calculations, dependencies, and related logic.
  2. displayValue: The value displayed in the client. If no displayValue is defined, the value is displayed.

Assignment

Both value and displayValue can be assigned in different ways:

  1. Via RecordContainer: The value is filled by the RecordContainer. How the value is loaded depends on the type of the RecordContainer.

  2. Via JDito processes: Calculate using valueProcess or displayValueProcess, which can contain JDito code that loads the value for the current dataset. See valueProcess.

  3. 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 valueProcess is not executed.
  • EDIT/NEW: The valueProcess/displayValueProcess is 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.