With Display Constraints, system administrators can control how fields display in screens, based on responses entered in other fields. Any field can be used as a constraint.
For example, in the system screen 2020 HUD: CoC Standard Project Enrollment, the field [income_individual] is set up with a constraint to only display when the field [income_cash_is] equals “Yes”.
In this article, we’ll use the terms “constrained field” and “constraining field” to mean:
- Constrained field: a field that has a display constraint applied to it. This field will only display in a screen if the conditions established in Display Constraints are met.
- Constraining field: a field that is added as a display constraint to another field. All field types except for dates can be used as constraining fields.
To apply a constraint to a field within a screen, create or navigate to the appropriate screen (figure 1).
Note: in order to add a constraint to a field, both the constraining and constrained fields must be first added to the screen.
Within the screen, add or locate the field you’d like to add a constraint to and click the edit icon (figure 2).
In the Display Constraints section click “Add Constraint” (figure 3) and select the appropriate field from the drop-down menu.
You have the option of indicating if the constraining field should equal, not equal, be greater than, or less than the selected response (figure 4).
If two or more constraints are added, the And/Or value must be set (figure 5).
- Or: when either/any of the constraints are met, the field will display in the screen
- And: all constraints must be met in order for the field to display in the screen
There’s no limit to how many constraints can be applied to a field, and the constraints only apply to the screen you’re editing.
Once a constraint has been added to a field, the icon will display next to the field in Screen Editor, indicating at least one constraint has been applied to the field (figure 6).
Advanced nesting logic can be applied to display constraints. This operates in the same manner advanced nesting logic does with Assessment Processors.
To add advanced logic, you’ll need at least three constraints added for the field. You can then use parentheses to group conditions and And/Or values. In the example below (figure 7), the field is setup with constraints to display if either:
Veteran Status equals “Yes” AND Disabling Condition equals “Yes
Formerly a Ward of Child Welfare or Foster Care Agency equals “Yes.”
When a screen field is not displayed due to a display constraint, no data can be saved for that field in that screen. This is in contrast to hidden fields where, even when a field isn’t displayed in the screen, that hidden field can still accept and store data.
This has data entry and screen design implications:
- Data entry: it’s possible for users to enter a value for a field when existing constraints allow so, and later change the constraining field, making the constrained field no longer visible. When this happens, the previously entered data for the constrained field will not be saved.
- Screen design: if a new constraint is introduced to an existing screen, this has the potential to clear previously saved data for that screen. This occurs when a field that previously displayed in the screen and for which data was entered no longer displays due to the new constraint.
If you require assistance introducing a new field with corresponding Display Constraint to a screen, please contact Technical Support to create a Statement of Work.