1. Home
  2. Creating New Objects/Fields
  3. Managing Constraints on a Definition
  1. Home
  2. Lab Management
  3. Managing Constraints on a Definition

Managing Constraints on a Definition

Constraints allow you to control the visibility, editability, and behavior of fields and groups within a definition. They enable forms to respond dynamically to context—such as the current phase of a workflow, selections made in other fields, or the role of the user interacting with the entity.

By applying constraints, you can:

  • Show or hide certain sections based on user input
  • Lock fields after submission or at specific workflow stages
  • Prompt users to fill in required information only when it’s relevant
  • Tailor the form experience to different user roles or project types

In this article, we’ll walk through how to add and configure constraints using a lab request definition as an example. These tools, however, are available across all definition types in the platform.

Adding Constraints to a Group

When a constraint is set on a group, it automatically applies to all fields within it. For example, constraints added to a Tab group can make it so that tab is only visible during relevant stages or to relevant users.

To add a constraint to a group, take the following steps:

  1. Select the field group.
  2. In the Constraints tab, select from the following options:
    • FieldConstraintReference: Reference constraints can be used to dynamically update a group based on other field values. Learn more about using reference constraints to filter List groups.
    • FieldConstraintEditable: Editability constraints determine when a group can be modified. Choose from options such as “Always,” “Never,” or limit editing to specific workflow phases or conditions. For example, these constraints can be used to ensure that groups becomes locked after submission.
    • FieldConstraintVisible: Visibility constraints control when a group is displayed based on predefined conditions. Instead of creating multiple request templates, a single request form can dynamically adjust its layout based on user selections, project associations, or workflow stages.

Field Constraints

Constraints can also be added directly on fields. Field constraints define when and how individual fields are displayed or modified.

To add a constraint to a field, take the following steps:

  1. Select the field.
  2. In the Constraints tab, select from the following options:
    • FieldConstraintsEditable: Editability constraints define when a field can be modified.
    • FieldConstraintsReference: Allow a field to update dynamically based on the values of other fields.
    • FieldConstraintsRequired: Ensures that a field must be filled out before a request can be submitted.
    • FieldConstraintsValue: Adds a condition on the value of a field.
    • FieldConstraintsVisible: Determine when a field is displayed based on predefined conditions. Rather than overloading request forms with unnecessary fields, this allows fields to appear only when relevant.
    • FieldConstraintsActive: Decides if the field component is active. The default behavior is true.
    • FieldConstraintsCopy: Decides if the field is copied when the associated entity is copied. The default behavior is true.
Updated on April 16, 2025

Was this article helpful?

Related Articles