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.
Access requirements
| 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.
For display and skip logic only, select a field to show the existing logic rules in the field settings.
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.
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
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.
-
Select the target field and click Add Logic.
-
Select the Display tab on the logic builder.
-
Click Add Display Rule.
-
Follow the steps below to create the logic statement in the builder.
-
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.
-
The second option is to choose the selection value. Only the values already defined for that field are available.
-
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.
-
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.
-
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.
-
-
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.
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.
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.
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)
Define advanced display logic
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Display tab on the logic builder.
-
Turn on Advanced mode.
This option might be turned on automatically, for fields that do not support the simple mode of display logic.
-
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.
-
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.
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
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).
-
Select the defining field and click Add Logic on the lower left of the screen.
-
Select the Skip tab on the logic builder.
-
Click Add Skip Rule.
-
Follow the steps below to create the logic statement in the builder.
-
The defining field is shown on the builder. It is the field you selected to apply the skip logic to.
-
The first option is to choose the selection value. Only the values already defined for the field are available.
-
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.
-
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.
-
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.
-
-
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.
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
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Default value tab on the logic builder.
-
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.
-
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
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Validation tab on the logic builder.
-
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.
-
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
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Formatting tab on the logic builder.
-
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.
-
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
-
Click the Main Menu icon
in the upper-right corner of Adobe Workfront, or (if available), click the Main Menu icon
in the upper-left corner, then click Setup
.
-
Click Custom Forms.
-
Create a new custom form or open an existing form. See Create a custom form for details.
-
Add fields to the form as needed.
-
Select the field to apply logic to, and click Add Logic.
-
Select the Editability tab on the logic builder.
-
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.
-
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.