Portail ZAPP

Dependency rules and variables

Available in en es fr

Updated on 10/25/2026

A dependency rule adapts a form to the user's answers: show a field only when it makes sense, make it required in certain cases. Variables give rules values that do not come from the form: the current user, today's date, a value read from the CMDB…

These settings are made in the Forms screen (see "Design a form"), open to Administrators and Form administrators.

Add a rule

On a draft, the Dependency rules card lists the version's rules (When … → effect → target fields), in the screen's language: field labels, conditions and combination ("and", "or"…) spelled out, compared values as badges. Then comes the form to add one:

  1. Combine conditions with: AND (all), OR (at least one), XOR (exactly one), AND NOT (first only, no other) or OR NOT (first, or no other);
  2. Effect: show, hide, make required or make optional;
  3. Target fields: tick the field or fields concerned; when the form has many, a search filters the list;
  4. one or more conditions (+ Condition to add one):
    • Trigger field: a field of the form, or Current user's groups. For a field that designates a user, Compare the groups of the user designated by this field compares their groups rather than their value;
    • Condition: equals, does not equal, contains, does not contain, starts with, ends with, is one of, is not one of, contains all of, is filled in, is not filled in, and for a number or a date is greater than, is less than (or equal to), is between, is not between;
    • Values: separated by semicolons. A value can be a variable (see below).

Click Add. A condition that expects a value (equals, contains, is one of…) and has none is flagged under the Values field, and the rule is not added; a condition row left blank (never touched) is not sent. A condition is removed with the bin icon on its row. A rule cannot be edited: delete it (bin icon) and create it again.

Test your rules in the Preview: enter values and watch fields appear or disappear. Nothing is saved.

Publication is refused if a rule is inconsistent: trigger field or target field missing from the version, a condition without a value when it expects one, an empty condition group, an ordering comparison on a field that is neither a number nor a date, a group comparison on a field that does not designate a user, or a required field that can never be shown. A reason about a rule spells it out (conditions → effect → target fields) and links to its row in the rules card; a reason about a field gives its label. When two fields share the same label, their identifier follows the label, in muted text between brackets; a field deleted since reads “deleted field”.

Built-in variables

In a condition's Values, these variables are always offered: The current user, The requester, The requested catalog service (the one that opened this form), Now, Today, Start of month, End of month, First Monday of month and Start of week. In a rule, the value of another field of the form is written {{field:identifier}} (with a colon, whereas the display template and number bounds use {{field.identifier}}).

Define your own variables

The Variables button of the form list opens the Variables screen (/dynamicforms/admin/variables). Each variable has a Token (lowercase, digits, _ and : only; the field: prefix is reserved), a Label and a Kind:

  • Computed date: a Base (Now or Today), an optional Anchor (start or end of month, start of week, first Monday of month) and an Offset (days);
  • SQL query: a single SELECT statement, read-only; the first column of the first row is the value. Only the columns listed under the field can be referred to as @column. This kind is reserved for Administrators: a form administrator is not offered it; on an existing SQL variable, they can only change the token and label — not the query, the kind, nor delete the variable;
  • CMDB path: a Starting point (Current user, Requester, or a Form field of the CMDB object selector type), a Path of successive hops (relation type, Outgoing or Incoming) and the Value to compare (Linked user, Asset identifier or Displayed label). Unavailable if the CMDB module is disabled.

On a variable's card, Test computes its value. For an SQL query or a CMDB path that depends on a real submission, enter the identifier of an Existing submission.

A variable used by at least one rule cannot be deleted.

See also

  • "Design a form": fields, versions and publication.
Applies from version 1.0 Verified for version 1.0

Was this article helpful?

Still need help? Create a request