Variables

Variables, similar to tokens in workflow, are containers for process and field information. When a process runs, variables store information specific to that process instance. Variables are used in processes and forms as placeholders for field and process information that will not be known until the process runs. Variables that store field information are called field variables; those that store process information (e.g., the process initiator's name, user actions and comments, etc.) are called process variables. View a complete list of variables

Example: A Total field on a form has a corresponding variable that stores the value for the Total field. When a user fills out the form and enters $100 in the field, the variable stores that information.

Although variables are incredibly useful as containers for information, their real value is as placeholders for that information while you are creating a form or process.

Example: Jim is building a routing decision in his process. When the value of the Total field is greater than $10,000, the form submission should be routed to a district manager. Using the field variable for the Total field in the conditional expression for this routing decision allows Jim to route the form based on the Total field's value when it is submitted.

Variables are incredibly powerful in that they allow you to work with placeholders for data that won't be available until the process runs. Watch a tutorial on using variables in the form designer (ClosedWatch).

You can use variables to:

Using Variables in the Form Designer

When you create a field, the variable for that field is also created. When editing a field, you can specify its variable name. Once the form is saved with the new field, you can edit it in the Variables tab of the palette by clicking the settings button to the right of the variable. You can use the Show drop-down menu to filter the variables shown in the list in the palette on the left, including all variables, variables only used in this form, and unused variables.

The variables from one form can be used as fields on another form within the same business process.

Example: Jim is creating an expense request form. The expense request form contains personal information as well as a Total field. The manager who approves expense requests only needs to see the Total field's value and shouldn't have access to any personal information. So Jim creates a new form for the manager's approval and drags the Total field's variable onto it. When the process runs, the variable is populated with the Total field's amount and the manager only sees the information relevant to him.

In the image above, a variable is grayed-out because it is from fields on the current form. You cannot use field variables on the form that contains those fields.

The variables that are not grayed-out are from other forms in the process. Drag these variables onto the form like fields. When this form is viewed, these variable fields will be automatically populated with the values from the other forms.

Using the Insert Variable Button with Fields

When editing the settings for a field, you may notice the Insert variable Variable button (right arrow) button next to the following settings.

These settings accept variables, so you can use them to dynamically generate instructions or default values for users. With the Insert variable Variable button (right arrow) button, you can use the values from field variables and process variables. You can also search for a variable using the Search box. Learn more

Using Variables in the Process Designer

In the process designer, you can use variables to represent field values and other process information, like the user who started the process, the action taken at a particular step in the process (e.g., approve, reject, submit), and comments. The Insert variable button Variable button (right arrow)next to a field indicates that it accepts variables. Click this button to see a list of each field and process variable that can be used.

Example: You want to assign a user task to the person who starts a process, but at the time you configure the user task, you don't know which user will start the process. You can accomplish this by using the initiator variable, which looks like: /_initiator.

Example: You want to route a form based on the value entered in a field. If you assign a variable to that field, you can use that variable as part of a conditional expression and accomplish that goal.

As mentioned above, you can use a variable to reference the action a user takes. This is especially useful in the Conditional Expression Builder, where different paths in the process can be followed based on user actions.

Editing and Deleting Variables

In the form designer, you can view all variables associated with the form, change variable names, and specify data maintenance settings for files that are uploaded from a form.

To edit or delete a variable

  1. In the form designer, click the Variables tab on the palette.
  2. Locate the variable you want to rename or delete. Variable names are not case sensitive. Click the settings button to open the Variable settings dialog.
  3. In the text box, type a display name for the variable.
  4. Optional: If the variable is for a file upload field, you can view the global policy for data maintenance that applies to the field, and select Override global policy if you want to specify an alternate policy for retaining uploaded files.
  5. Click Done.

Click Delete to delete the variable. When prompted, click Delete again to confirm.

Tip: If the variable is for a table or collection, you can delete columns from the table or sets from the collection by clicking the X next to the sets' or columns' variables.

Variable Management

Variable management is accessed from the left toolbar under Settings while in the form designer.

When a variable is selected, the right pane will display where in the process the variable is used, with links to the form(s) or process object(s) where the variable is used. When a collection or table variable is selected, any additional variables contained within will be listed as well.

Creating Variables

When you create a field, the variable for that field is also created. When editing a field, you can specify its variable name.

Editing and Deleting Variables

To edit or delete a variable

  1. Open the Variable Management page.
  2. Locate and select the variable you want to rename or delete. Variable names are not case sensitive. Click the rename button Icon representing rename variable button to change the variable name.
  3. In the text box, type a display name for the variable.
  4. Click Save. The new name will propagate throughout the process.

Click delete button Trash can icon representing delete variable button to delete the variable. When prompted, click Delete again to confirm. Multiple variables may be selected and deleted at the same time.

Click the data maintenance settings button Gear icon representing data maintenance settings button to specify the data maintenance settings for file upload fields. When the field is within a table or collection, this will be available in the right pane. If the field is selected directly in the variable list, this will be in both the right pane and the toolbar.

Related Topics