This object allows you to assign values to interface fields or even create expressions that can be used in the workflow objects themselves.
When you click the (Expression) button, the following screen is displayed.
The configuration fields on this screen are described below:
- Parameters (A): Drop-down list field containing all fields of the corresponding tab.
- Parameters (B): Same as the Parameter (A) field, but contains a list of additional functions.
- Parameters (Operators): Type of operation between the fields as listed below:
Operator | Description |
---|---|
+ | Addition operator |
- | Subtraction operator |
x | Multiplication operator |
/ | Division operator |
& | Concatenation operator |
- Parameters (C): Same as Parameter (B).
- Parameters (Constant):
If one of the functions Constant(Numeric), Constant(Text) or Constant(Date) is selected in parameter (B) or ©, this field must be filled with the value of the constant. - Process Title: Title of the process
- Return Value:
Return value of the object. The return value is made through variables of type process-name.Expr-x. The value contained in the expression can be used in other objects of the workflow.
Using the expression object to initialize fields
Below we will demonstrate a practical example of using the Expression object. Let’s use the interface (8D) – Eight disciplines problem solving as a reference. In this example we will initialize the fields below whenever the user clicks on the (New) button.
- Field (Owner):
Drop-down list type field containing a list of all users registered in the application. Let’s initialize this field with the UserLogged(ID) function, which returns the user logged into the application.
- Field (Start Date):
Field of type date. Let’s initialize this field with the Today() function that returns the current system date.
- Field (Due Date):
Field of type date. Let’s initialize this field with the Today() function plus a constant numeric value. In practice we will add the current date to a numerical value creating a future date.
- Field (Follow-up):
Drop-down list type field. Let’s initialize this field with an item from your list.
Using the expression object to build a message
Now let’s demonstrate an example where an expression is created to build a message and display it to the user through the object (Message). Let’s create a workflow associated with the button (Change) in the interface (8D). The purpose of the workflow is to ensure that only the user (Owner) can change the records. If the user is not the (Owner), a message must be displayed informing that only the user (Owner) is allowed to change the record and then abort the event (Change).
The message will be as follows:
This record can only be changed by the owner (owner field value).
Where owner field value is the text of the field (Owner).
Post your comment on this topic.