Field dependencies

In DAL 2 scripts, you can define field dependencies used to determine default values. when these field dependencies are defined, dependent fields update themselves when the fields they depend on are updated. The field updates are defined in the DAL as a field hook.

Dependencies are also used to update the User Interface. The 4GL Engine uses these field dependencies to disable and enable fields, and determine enum values.

Examples of field dependencies are as follows:

  • The packing field of the Item is yes if the gross weight and net weight of the item are different. A field dependency is defined so the packing field is updated if the gross or net weight fields change.
  • An item without a gross weight cannot have a net weight and packing. A field dependency is defined so the net weight and packing fields are disabled if the gross weight is zero.