Add logic rules to custom forms and fields

The highlighted information on this page refers to functionality not yet generally available. It is available only in the Preview Sandbox environment.

Logic rules allow you to further customize the fields on your form.

For example, you can display or skip fields or sections in a custom form based on the choices that a user makes when filling it out.

NOTE
Logic only applies within one form and can’t be based on selections from a different form.

Access requirements

Expand to view access requirements for the functionality in this article.
table 0-row-2 1-row-2 2-row-2 layout-auto html-authored no-header
Adobe Workfront package

To apply advanced display, default value, conditional formatting, or editability logic: Workflow Prime or higher

To apply all other logic types: Any Workfront or Workflow package

Adobe Workfront license

Standard

Plan

Access level configurations Administrative access to custom forms

For information, see Access requirements in Workfront documentation.

Logic indicator icons

Custom forms display icons to indicate when logic is applied to the fields.

Click Show logic in the form designer header to show or hide the icons for the different field logic types.

Icon
Definition
Display logic for target field
The field is the target field where the display logic is applied. If a specific selection is made on the form, then this field is displayed.
Display logic icon for reference field
The field is the reference field for display logic. A specific selection or value on this field displays the target field.
Skip logic for target field
The field is the target field where skip logic is applied. A specific selection or value on this field skips other fields and goes directly to the reference field.
Skip logic icon for reference field
The field is the reference field for skip logic. If a specific selection is made on the target field, then the form skips ahead to this field and fields in between are hidden.
Validation logic for target field
The field is the target field where validation logic is applied. A specific selection or value on the reference field determines whether the validation fails. The target field and the reference field can be the same for validation logic.
Validation logic for reference field
The field is the reference field for validation logic. A specific selection or value on this field determines whether the validation fails on the target field. The target field and the reference field can be the same for validation logic.
Default value logic for target field
The field is the target field where default value logic is applied. A specific selection or value on the reference field determines the default value. The target field and the reference field can be the same for default value logic.
Default value logic for reference field
The field is the reference field for default value logic. A specific selection or value on this field determines the default value on the target field. The target field and the reference field can be the same for default value logic.
Formatting logic for target field
The field is the target field where formatting logic is applied. A specific selection or value on the reference field determines the formatting. The target field and the reference field can be the same for formatting logic.
Formatting logic for reference field
The field is the reference field for formatting logic. A specific selection or value on this field determines the formatting on the target field. The target field and the reference field can be the same for formatting logic.
Editability logic for target field
The field is the target field where editability logic is applied. The field can be editable or read-only when the defined conditions are met. The target field and the reference field can be the same for editability logic.
Editability logic for reference field
The field is the reference field for editability logic. When the defined conditions are met on this field, the logic is applied on the target field. The target field and the reference field can be the same for editability logic.

For display and skip logic only, select a field to show the existing logic rules in the field settings.

Logic rules

Considerations for using display logic and skip logic

  • To add display logic on a custom field, widget, or section break, at least one multiple choice field (radio buttons, dropdown, or check boxes) must be positioned prior to it on the form.
    For information about custom fields and widgets in custom forms, see Create a custom form.

  • You cannot add skip logic to a widget or section break. You can add it only to a multiple choice field (radio buttons, dropdown, or check boxes).

  • You cannot apply display or skip logic to show or hide the choices of a multi-option field. For example, you cannot restrict the choices that display for a Dropdown, a Checkbox group, or a Radio Button field, based on the display or skip logic of another field.

  • You can add both display logic and skip logic to a custom field if all of the following is true about the custom field:

    • It is a multiple choice field (radio buttons, dropdown, or check boxes)
    • It is preceded by a multiple choice field
    • It is followed by another custom field
  • When copying forms with display logic or skip logic, the logic is copied to the new custom form.

  • When editing objects in bulk, all custom fields display in the Edit objects box, including the fields that are skipped or hidden.

  • Keep the following in mind when you create a display logic rule for a custom form:

    • Custom fields not included in a display logic statement show on a custom form, by default.
    • You can create multi-field display logic statements.
    • If all of the fields under a section break have display logic applied to them and they are all hidden as a result of the logic, the entire section will be hidden on the custom form.

Add display logic to a custom form

Display logic defines which custom fields appear on the form when the user selects a specific value in a multiple choice field. The logic is added to the target field, which is only displayed when the value is selected.

NOTE
This procedure describes the basic mode for display logic. Advanced display logic is also available. For more information, see Add advanced display logic to a custom form, in this article.
  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed. At least one multiple choice field (radio button, dropdown, or check box) must be positioned prior to the target field that will display.

  5. Select the target field and click Add Logic.

  6. Select the Display tab on the logic builder.

  7. Click Add Display Rule.

    Display logic builder

  8. Follow the steps below to create the logic statement in the builder.

    1. The first option is to choose the defining field. This is the field with the selection value that displays the target. It must be a multiple choice field.

    2. The second option is to choose the selection value. Only the values already defined for that field are available.

    3. The third option is Selected or Not Selected. Choosing Selected means that when the value is selected, the target field is displayed. Choosing Not Selected means that when any other value is selected in the defining field, the target field is displayed.

    4. To add an And rule to the logic statement, click Add Rule directly underneath the rule you just created. Follow the same prompts to build the rule. All of the And rules must be met for the target field to be displayed.

      Display logic builder

    5. To add an Or rule to the logic statement, click Add Rule near the bottom of the logic builder. Then, click Add Rule inside the Or area and follow the same prompts to build the rule. When one Or rule is met, the target field is displayed.

  9. Click Apply when you are finished building the logic statement.

    The display logic icons are added to the target field and the defining field in the form designer.

recommendation-more-help

Add advanced display logic to a custom form

The advanced display logic for custom form fields allows you to build complex logic using formulas. You can apply this logic to the following field types: single line text, paragraph, text with formatting, single-select dropdown, multi-select dropdown, external lookup, multi-select external lookup, native field reference, typeahead, calculated, date, checkbox group, and radio buttons.

NOTE
This procedure describes the advanced mode for display logic. Basic display logic is also available. For more information, see Add display logic to a custom form, in this article.

Examples

You can use advanced display logic to control the visibility of custom form sections based on user roles and the visibility of a field based on another field’s status.

No logic is applied to the default section on the form, so it is always visible to all users.

Using the following condition, the Resources Required section is only displayed when a user with the job role of Resource Manager views the form.

IF($$USER.{roleID}="123abc", true)

Note that 123abc represents the role ID of the Resource Manager.

Form section displayed for role

The same condition with a different role ID is applied to the Project Financial KPIs section to define that only the Financial Advisor role can view the section.

Using the following condition, the Sold KPI field only becomes visible when the project is complete. This logic is applied directly to the field instead of to a form section. There is no need to specify which role can view the field, because that is already defined in the section that the field is in.

IF({status}="CPL", true)

Field is visible on complete project

Define advanced display logic

  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed.

  5. Select the field to apply logic to, and click Add Logic.

  6. Select the Display tab on the logic builder.

  7. Turn on Advanced mode.

    This option might be turned on automatically, for fields that do not support the simple mode of display logic.

    Advanced mode for display logic

  8. Build the display condition in the editor.

    For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.

  9. Click Apply.

    The logic is applied to the field and the display logic icon is added in the form designer.

    note note
    NOTE
    Advanced display logic is not supported in the form designer preview mode.

Add skip logic to a custom form

Skip logic defines custom form fields that are skipped when the user selects a specific value in a multiple choice field. Skipped fields are hidden on the form. The logic is applied to the defining field where the selection is made, not to the fields that are skipped.

  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed. The defining field for skip logic must be a multiple choice field (radio button, dropdown, or check box).

  5. Select the defining field and click Add Logic on the lower left of the screen.

  6. Select the Skip tab on the logic builder.

  7. Click Add Skip Rule.

    Skip logic builder

  8. Follow the steps below to create the logic statement in the builder.

    1. The defining field is shown on the builder. It is the field you selected to apply the skip logic to.

    2. The first option is to choose the selection value. Only the values already defined for the field are available.

    3. The second option is Selected or Not Selected. Choosing Selected means that when the value is selected, the target field is displayed and the fields in between are skipped. Choosing Not Selected means that when any other value is selected in the defining field, the target field is displayed and the fields in between are skipped.

    4. The third option is the target field, or where to skip to. Select a field name or End of form. You might need to click the word “empty” first before selecting an option.

      Skip logic builder

    5. To add an Or rule to the logic statement, click Add Rule near the bottom of the logic builder. Then, select the options following the same prompts to build the rule. When one Or rule is met, the target field is displayed.

  9. Click Apply when you are finished building the logic statement.

    The skip logic icons are added to the target field and the defining field in the form designer.

Add default value logic to a custom form

Default value logic allows you to configure default values for custom form fields, using formulas. The default value is displayed when the defined conditions are met. A default value can be a static value or a dynamic value that references other fields within the object. Although the default value can reference other fields, it will not change as other fields on the form change.

You can apply advanced default value logic to the following field types: single line text, paragraph, single-select dropdown, multi-select dropdown, external lookup, multi-select external lookup. native field reference, typeahead, checkbox group, and radio buttons.

TIP
A default value is applied only once to a custom field, when the custom form is attached to the object. If the default value formula is dependent on the value of another field, then the value in the other field must already exist when the custom form is attached.
NOTE
Standard default value logic in the form designer still exists. If both types are applied on the same field, then the advanced logic takes precedence. For information on standard default value logic, see Add radio buttons, checkbox groups, and drop-downs in Create a custom form.

Example

Using the following formula, the multi-select dropdown field that the logic is applied to will pull its default value from the project description when the project status is Planning.

IF({status} = 'PLN', ARRAY({description}, ','))

When the custom form is attached to a project and the project status is Planning, then the project description field value is used as the default value in the multi-select field. Because it is a multi-select field, more than one value can be pulled in when the values match the description. If the description value does not match any of the multi-select value options, then the multi-select field will not have a default value and the user can select a value from the dropdown.

Define default value logic

  1. Click Custom Forms.

  2. Create a new custom form or open an existing form. See Create a custom form for details.

  3. Add fields to the form as needed.

  4. Select the field to apply logic to, and click Add Logic.

  5. Select the Default value tab on the logic builder.

    Default value logic builder

  6. Build the default value condition in the editor.

    For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.

  7. Click Apply.

    The logic is applied to the field in the form designer.

    note note
    NOTE
    Default value logic is not supported in the form designer preview mode.

Add validation logic to a custom form

Validation logic is built using formulas, and you can make the logic as simple or as complex as you need. The validation can be based on the values of other fields or the status of objects, and you can provide an error message for when the validation fails.

If the field with the logic applied meets the defined validation conditions when a user fills out the custom form, the field is highlighted and the error message is displayed.

You can apply validation logic to the following field types: single line text, paragraph, single-select dropdown, multi-select dropdown, external lookup, multi-select external lookup, typeahead, date, checkbox group, and radio buttons.

Examples

Using the following condition, the Budget field displays a message underneath the field when the user enters a value that triggers the message. For example, if the entered value is negative, the first message is displayed. If the user tries to change the project status to Current before entering a budget value, the second message is displayed.

IF({DE:Budget Field} < 0,
     "Budget cannot be negative",
     IF({DE:Budget Field} == 0 && {status} == "CUR", "Budget must be specified before moving to Current status")
)

Another simple example is that a phone number field must contain a certain number of digits to be valid.

An additional example for validation based on other fields is a field for meeting room size (small, medium, or large) and a separate field for the number of meeting attendees. The number of people for each room size is written in the validation formula. If the number of attendees the user enters is too many for the chosen meeting room, the error message is displayed.

For additional examples of validation logic, see Examples of advanced logic in custom forms.

Define validation logic

  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed.

  5. Select the field to apply logic to, and click Add Logic.

  6. Select the Validation tab on the logic builder.

    Validation logic builder

  7. Build the validation condition in the editor, including the error message to display when the validation is not met.

    For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.

  8. Click Apply.

    The logic is applied to the field in the form designer.

    note note
    NOTE
    Validation logic is not supported in the form designer preview mode.

Add formatting logic to a custom form

Formatting logic highlights a field value when it meets the defined conditions. The applied formatting will work on multiple fields at once.

You can apply formatting logic to the following field types: single line text, paragraph, single-select dropdown, multi-select dropdown, external lookup, multi-select external lookup, typeahead, calculated, date, checkbox group, and radio buttons.

Formatting applied to custom forms is separate from formatting applied to lists and reports. For information on report formatting, see Use conditional formatting in views.

Example

Using the following condition, the Budget field appears red when the user enters a value of 1000 or more. The field appears yellow when the user enters a value of 500 or more.

To add a hover-over definition of the formatting, use the Instructions field in the custom form. For example, a message on the Budget field could say “Please enter a budget within a reasonable range. Values over 500 are a warning notice, and above 1000 is considered too high.”

IF(
     {DE:Budget Field} >=1000,
     FORMAT($$NEGATIVE),
     IF({DE:Budget Field} >= 500, FORMAT($$NOTICE))
)

Define formatting logic

  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed.

  5. Select the field to apply logic to, and click Add Logic.

  6. Select the Formatting tab on the logic builder.

    Formatting logic builder

  7. Build the formatting condition in the editor.

    You can add up to five formatting rules per field.

    The field highlighting color options are:

    • $$POSITIVE (green)
    • $$INFORMATIVE (blue)
    • $$NEGATIVE (red)
    • $$NOTICE (orange)

    The text formatting options are:

    • $$BOLD
    • $$ITALIC
    • $$UNDERLINE

    Only one color option may be used per function, along with up to three additional text formatting options. If no color option is specified, the system’s default color is applied.

    For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.

  8. Click Apply.

    The logic is applied to the field in the form designer.

    note note
    NOTE
    Formatting logic is not supported in the form designer preview mode.

Add editability logic to a custom form

Editability logic determines whether a custom form field can be edited or whether it is read-only. This logic is built using formulas, and when the field meets the defined conditions it can be set as editable or read-only.

You can apply editability logic to the following field types: single line text, paragraph, text with formatting, single select dropdown, multi-select dropdown, external lookup, multi-select external lookup, typeahead, date, checkbox group, and radio buttons.

Example

Using the following formula, the field with logic applied is only editable when another field called Radio has the Enabled choice selected.

IF({DE:Radio} = "Enabled", true)

Using the following formula, the Description field is only editable when it is blank. Once a value is entered, then it becomes read-only.

IF(ISBLANK({DE:Description}), true)

Using the following formula, the field with logic applied is only editable when a user with the job role of Resource Manager views the form.

IF($$USER.{role}.{name}="Resource Manager", true)

Define editability logic

  1. Click the Main Menu icon Main Menu in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon Main Menu in the upper-left corner, then click Setup Setup icon .

  2. Click Custom Forms.

  3. Create a new custom form or open an existing form. See Create a custom form for details.

  4. Add fields to the form as needed.

  5. Select the field to apply logic to, and click Add Logic.

  6. Select the Editability tab on the logic builder.

    Editability logic builder

  7. Build the editability condition in the editor.

    For more information about calculations and expressions, see Add calculated fields to a form and Overview of calculated data expressions.

  8. Click Apply.

    The logic is applied to the field in the form designer.

    note note
    NOTE
    Editability logic is not supported in the form designer preview mode.
5f00cc6b-2202-40d6-bcd0-3ee0c2316b43