|
|
The Variable step allows you to add steps which set field values or control the path a user takes when a step is actioned. For example, a value can be set automatically (Let), by user input (Set Variable) or a local variable can be created to ask users for a response (Dim) in order to proceed. The type of entry is selected from a drop-down menu attached to the Variable button.
A number of properties affecting the way the Variable step behaves, once it has been actioned, can also be set when adding the step. The type of entry you choose determines what those options are.
To add an Input statement:
This command is used as an alternative to a DIM statement (see below) where a Web Service has created a temporary variable. In order for a workflow to recognise and operate on such a temporary variable, an Input statement must be created in the procedure before the first use of the temporary variable.
Click Input on the Variable button's drop-down menu. You are prompted to enter the input parameters.
Note The name of the temporary variable must be enclosed within angle brackets, e.g. my_temp_var should be entered as <my_temp_var>. Angle brackets are not the same as the square brackets usually used within, for example, merge documents to denote a variable.
Click OK to save your changes. A line of code is automatically entered into the procedure block. Show me:
To add a Dim statement:
Use this statement to define a local variable and allocate storage space. These variables are only available within the current procedure.
Click Dim on the Variable button's drop-down menu. You are prompted to enter the name of the variable.
Type the name of the local variable.
Click OK to save your changes. A line of code is automatically entered into the procedure block. Show me:
Notes
When you use the Dim statement, you generally put it at the beginning of the procedure.
Local variables cannot be used as parameters in system calculations. However, this is permitted for user variables.
To add a Let statement:
Use this statement to assign the value of an expression to a variable or property .
Click Let on the Variable button's drop-down menu. You are prompted to build the expression.
Build the expression using the options provided. An expression is simply a set of instructions. You can define basic expressions or more complex, powerful expressions. Use basic expressions to specify which variables to include or exclude. Use advanced expressions if you are comfortable working with operators.
Click OK to save your changes. A line of code is automatically entered into the procedure block. Show me:
Notes
Let statements can be used to assign one record variable to another only when both variables are of the same data type.
It is not possible to use Let statements with lookup variables through workflow.
To add a Set variable statement:
Use this statement to set the value of a variable based on user input.
Click Set Variable on the Variable button's drop-down menu. You are prompted to enter the step details.
Enter the step properties:
Variable name. Name of variable to be set.
Message. Message displayed when step actioned, e.g. Please enter value.
Default value. Initial value of variable.
Conditional / Unconditional. Flags whether the variable request is displayed irrespective of whether the variable contains data (Unconditional) or only if data has not already been entered (Conditional). NB. If a default value has been set for a variable, it will never be shown if set to 'Conditional'.
By client / By matter. Filters the user and database variables by client or matter.
User variables. Displays the user variables which can be selected for inclusion in an expression.
Database variables. Displays the database variables which can be selected for inclusion in an expression.
Click OK to save your changes. A line of code is automatically entered into the procedure block. Show me:
Note
If you want to force a fill-in variable to only accept a logical Yes/No, use the following command prior to the Set Variable step; Let [your fill-in variable name] = Yes. However, if instead you want to force the variable to only accept a numeric input, use the following; Let [your fill-in variable name] = 1.
To add an Assign Entity statement:
Use this statement to assign or re-assign entity field values, e.g. matter fee earners. For example, this could be used to automate the re-assigning of matters if, for example, a fee earner leaves or to distribute work imported from bulk referrers.
Click Assign Entity on the Variable button's drop-down menu. You are prompted for three parameters; entity, field and value.
From the Entity drop-down, pick the entity you want to change. The entity you select determines which fields are displayed in the Field drop-down. The matrix below shows which fields (down the side) can be changed for which entities (across the top):
|
Entity/Field |
Bill |
Client |
Contact |
Matter |
Packet |
Project |
Prospect |
SumMat |
|
Branch |
|
|
|
● |
|
● |
|
● |
|
Classification |
|
● |
● |
|
|
|
● |
|
|
Credit control status |
● |
|
|
|
|
|
|
|
|
Department |
|
|
|
● |
|
● |
|
● |
|
Fee earner |
|
|
|
● |
|
● |
|
● |
|
Funding type |
|
|
|
● |
|
● |
|
|
|
Location |
|
|
|
|
● |
|
|
|
|
Partner |
|
● |
|
● |
|
● |
● |
● |
|
Rate table |
|
● |
|
● |
|
● |
|
|
|
Work type |
|
|
|
● |
|
● |
|
● |
From the Field drop-down, select field you want to change.
In the Value field, type a value to be passed or use the lookup to generate one by building an expression.
Click OK. A line of code is automatically entered into the procedure block. Show me:
When the workflow is run the appropriate entity field is assigned with the value specified.
To add an Assign Lookup statement:
Use this statement to assign or re-assign the value of an existing user-defined lookup.
Click Assign Lookup on the Variable button's drop-down menu. You are prompted for three parameters; variable name, data type and data value.
In Variable name, type or lookup the variable you want to change, i.e. the user-defined lookup.
From the Data type drop-down, select the data type of the variable you want to change.
In Data value, type a the value to be set or use the lookup to generate one by building an expression.
If you want to clear down the values stored, set the data value to null by entering double quotes like this "".
Click OK. A line of code is automatically entered into the procedure block. Show me:
When the workflow is run the appropriate lookup is assigned with the value specified.
Note
This process allows independent access to both sides of parent and child lookups. If workflow changes a parent value, then the child value will be blanked out on screen if the entry is no longer valid for the new parent. However, the original value is retained behind the scenes so developers can still access it if required. Example:
To add a Select related Party statement:
Use this statement to code workflow so that a list of related parties of the same type is displayed to users for the current context. As a result, they can then select a related party to run any subsequent workflow against.
Click Select Related Party on the Variable button's drop-down menu. You are prompted select a related party type.
In Relationship, type or lookup the desired related party type, e.g. EA.
Click OK. A line of code is automatically entered into the procedure block. Show me:
When the workflow is run the appropriate related parties will be displayed.
Note
Leaving the Relationship parameter blank will return all related parties for the current context.