Entity Field - On Change Handling

Load data in another field or group of fields on change of selected fields data.

The OnChange Event

The OnChange event of an Entity Field is fired when the user edits a value in the Field's input. If the Field is of Child(many) type, then adding, updating, or deleting records from a child grid on the parent Entity's Details UI also triggers this event.

Handle an OnChange Event

Handle an OnChange Event

To handle an OnChange event:

  1. Click on the Entity Field for which the OnChange event is to be handled.

  2. In the Field's properties, set the OnChange handling script in the UI Properties > On Change Script property.

  3. In the Field's properties, select the fields that need to be refreshed on the UI in the UI Properties > Update On Change property.

  4. Click Save and generate the Entity UI.

Example:

Calculate the age when the date of birth field changes. See the Date of Birth field in XLib.Samples.Todo > Employee.