"Conditional" fields offer a flexible way to define conditional text and paragraphs within your document. By utilizing a "Conditional" field, you can specify that a field's value should be determined by the value of one or more other fields.
"Conditional" fields allow you to specify as many conditions as you like, set a default value if those conditions are not met, or "exclude" (remove) the field if the conditions are not met.
Creating a Conditional Field
Step 1: Create a field that your new conditional field will depend on
The first step in implementing a conditional field is to identify the field (or fields) that your conditional field will depend on. If you don’t have an existing field, the simplest way to do this is to create a “single select” field with a predefined list of options.
Step 2: Create a conditional field that depends on the field you just created
After you’ve created at least one field that a new conditional field could depend on, you can specify as many individual conditions that you like within the new conditional field. The individual conditions follow this structure:
IF [another field] [equals/is greater than etc.] [some value]
THEN [some value for the conditional]
NOTE: When specifying multiple individual conditions within a conditional field, the conditions are evaluated in the order that they are defined. For example, if we had a list of individual conditions:
IF “Number” < “3” THEN “Less than three”
IF “Number” = “2” THEN “Equals 2”
The conditions will be evaluated from #1 - #2. If the value of “Number” was “2” in this case, #1 would be executed first, and the value of the conditional field would be “Less than three.” Since the #1 condition is evaluated as true first, all other conditions after it are skipped.
Conditional fields offer several operators to compare one value to another:
“test” equals “test” => TRUE
“does not equal”
“test 1” does not equal “test” => TRUE
“123” is greater than “456” => FALSE
“123” is less than “456” => TRUE
“” is empty => TRUE
“is not empty”
“” is not empty => FALSE
“123” contains “4” => FALSE
“does not contain”
“123” does not contain “4” => TRUE
This operator evaluates to
TRUE if the field that it references is marked as "excluded", and
FALSE otherwise. Learn how to exclude fields here.
Step 3: Insert the conditional into your document
Once you’ve defined your conditional field, you insert it into the document wherever you like just like any other field. Sit back and watch the value for your conditional field automatically change based on the values of its dependent fields.
Remember, you can always edit your conditionals by adding/removing individual conditions or editing the values that the conditions evaluate to.
Read more tips about the IF section here.
The THEN section in any condition has several options for specifying a value. Read more about it here.
Learn more about how to create dynamic fields that won't display in the template unless you need them.