Customize Conditional Formatting of a Field
It is possible to display a section on a form based on what you chose in an option selection or checkbox field by using conditional settings. This can be done on your Situation, Personnel, Roles, Status Board, Task Board and Form templates.
🔑 ACCESS LEVEL: Account Owner
Conditional Settings on an Option Selection Field
- Go to the Admin Area
- Example Templates
- Click on the Situation template
- Hover your mouse over the field you will use to trigger a section to appear ('Incident Type' in this example). Click on More Options [⋮] and copy the Field ID
- Go to the section that you want to trigger to appear on your form if 'Storm' is selected as the incident type
- Hover your mouse over the Section title bar. Click on More Options [⋮] and Show based on a condition...
- Type the following into the expression box:
- thisDocument.data.incident_type === 'storm'
- Click OK
- Once finished click Save at the bottom of the page
ℹ️ NOTE: You can paste in the Field ID you have copied from the field that will trigger the section to appear, in this case incident_type. 'storm' = different_option_id; is the selection that will trigger the section to appear.
- Expression: thisDocument.data.field_id === 'different_option_id'
- Expression to use when more than one selection will trigger the section to appear: thisDocument.data.field_id === 'different_option_id' || thisDocument.data.field_id === 'different_option_id'
- || = OR
- & = AND
Conditional settings on a Checkbox field
- Go to the Admin Area
- Example Templates
- Click on the Situation template
- Hover your mouse over the field you will use to trigger a section to appear ('City Impact' in this example). Click on More Options [⋮] and copy the Field ID (city_impact)
- You will also need the field label of the option that is checked off in the field. We will use High Impact in this example
- Type the following into the expression box:
- thisDocument.data.city_impact.high_impact === true
- Click OK
- Once finished click Save at the bottom of the page
ℹ️ NOTE: Field_id will be the field label you copy from the checkbox field. different_option_id will be whatever option is checked in the checkbox field that will trigger the section to appear.
- Expression: thisDocument.data.field_id.different_option_id === true
- Expression to use when more than one selection will trigger the section to appear: thisDocument.data.field_id.different_option_id === true || thisDocument.data.field_id.different_option_id === true
- || = OR
- & = AND