Form 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.
You can use variables to:
- Create an email notification populated with field and process information.
- Route a form to a specific person based on the value of one or more fields.
- Create forms pre-populated with values entered on another form associated with the process.
- Configure reports.
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 button next to the following settings.
- Field label
- Text above field
- Text below field
- Default value
- Tooltip
These settings accept variables, so you can use them to dynamically generate instructions or default values for users. With the Insert variable 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 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
- In the form designer, click the Variables tab on the palette.
- 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.
- In the text box, type a display name for the variable.
- 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.
- 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
- Open the Variable Management page.
- Locate and select the variable you want to rename or delete. Variable names are not case sensitive. Click the rename button to change the variable name.
- In the text box, type a display name for the variable.
- Click Save. The new name will propagate throughout the process.
Click delete 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 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