Advanced Form Action Examples

Using Transitions in Form Action Conditions

You can use a condition in a form action that compares against the current transition. This enables you to create different behaviors for different transitions. You can then use a form with the same visual design for multiple transitions rather than create a different transition form for each unique form action.

For example, you can create a form action that sets a Manager field as required when the Customer Priority field is set to "Critical." You may want this action to fire only for the "Evaluate" and "Assign" transitions, but not for the "Complete" transition.

In this case, add this condition to your action expression:

the current transition is/is not in the specified list of transitions

You can then specify transitions for which the action is valid or invalid, and the form action is then fired only for applicable transitions.

You can also use "Else If" conditions to build more complex form actions based on the current transition. For example, you may create an action that shows or hides fields based on specific transitions:

image

This particular action hides the Due Date field for all transitions except "Assign" and "Approve."

Calling Other Actions

You can create a form action that calls another form action on the same form. This enables you to use a form action in different circumstances, without having to repeatedly create the action expression.

For example, you can create an action called "Show Manager Section Based on Priority." This action shows the Manager field section when the Priority field is set to "critical" and hides the Manager field section when any other value.

The action uses the event "When this action is called," as shown below:

image

You can then create other actions that call the "Show Manager Section Based on Priority" action based on a different action expression. For example, you can create an action that calls the "Show Manager Section Based on Priority" action when the value of Priority field changes.

image

Comparing and Copying Field Values in a Form Action

You can create a form action that compares the values of two fields. This enables you to create different behaviors based on if the values match.

For example, you can create a form action that compares two text fields when the Compare button is clicked. Depending on if the values match, the message "Values are the same" or "Values are different" appears.

image

You can also create a form action that assigns a value to a field using another field's value. This enables users to copy the contents of one field to another, saving time and preventing repetition. If users need to modify the field's copied value, this does not change the originating field's value.

For example, you can create a form action that sets the "Actual Start" date/time field to the value of the "Proposed Start" date/time field when the Copy Date button is clicked.

image

The list of fields and controls available as a right-hand parameter is restricted by the field or control chosen as the left-hand parameter. The following guidelines apply to both comparing and copying field values: