Configure Nested and Cross-Schema Conditions
Set up a condition whose trigger or targets live inside referenced sub-schemas.
Set up a condition where the trigger field, the controlled fields, or both live inside referenced sub-schemas.
Prerequisites
You are signed in as a Standard Registry user.
The schema you are editing is in DRAFT status and already has at least one field of type Sub-Schema referencing a loaded sub-schema.
For cross-schema conditions, you need at least two Sub-Schema fields referencing different sub-schemas.
Neither the trigger field nor the target field is inside a repeatable (array) sub-schema. Those fields are not offered in the pickers.
Steps
Use a nested field as the trigger
Open the schema in the Schema Editor and switch to the Conditions tab.
Select Add condition.
Leave the block set to IF for a single rule, or choose IF ALL or IF ANY if you plan to add more than one rule.
Under When, open the field picker. Fields are grouped: the parent schema's own fields at the top, then one group per referenced sub-schema, labeled with the sub-schema's name.
Select a field from one of the sub-schema groups.
Enter the match value to the right of the picker. Fields with a fixed set of values offer a Select value⦠dropdown; others take free text.
To add another rule to the same block, select Add condition row.
Add cross-schema targets to a THEN or ELSE branch
In the THEN column, open the Ref field dropdown and select a field from a sub-schema. If the dropdown reads (no sub-schema fields), the schema has no eligible referenced fields.
To control a whole block rather than one field, choose an option carrying the Sub-schema badge. That adds one target for the entire block instead of one target per field.
The target appears in the branch as a path, for example
Project Details βΊ Location βΊ region. Use open to jump to the target schema, or the close control to remove the target.Repeat in the ELSE column for fields that should appear when the condition does not match.
Use New field in either column to create a field that lives directly on this schema rather than in a sub-schema.
Save the schema
Select Save all.
Result
When a user fills in the parent form:
The trigger value is read from the field inside its sub-schema.
When it matches, the THEN targets appear in their own sub-schemas.
When it does not match, the ELSE targets appear instead, and the THEN targets are hidden and must not be submitted.
Troubleshooting
Sub-schema fields do not appear in the picker. The sub-schema must be fully loaded in the editor. If a group is missing, check that the Sub-Schema field has a valid schema type assigned and that the referenced schema is available in your policy context.
A field I expected is missing from the picker. Fields inside a repeatable (array) sub-schema are excluded by design, as is the repeatable container itself. See Cross-Schema Conditions for why.
Related
Concept: Cross-Schema Conditions
Task: Creating Schema using UI
Reference: Conditional and Visibility Logic
Last updated