All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

Minimum maximum and default expressions

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords">

default value, minimum value, maximum value, expression, expressions

</keywords>

Default Value, Minimum Value and Maximum Value Expressions

Date-time, number and currency type attributes can have associated an Expression (rule) in order to evaluate values based on conditions.

In Grids, a default value can be configured for the edit and the add form. It works just like in any other form, and is saved when clicking SAVE on the user interface.

However, when a default value is defined in a display form, it will be shown only when the attribute has NO value. That is, when the attribute is null. If the attribute where the defaul value is, has had a value entered in the edit or add form, it will NOT BE REPLACED.

Example for a Default Value Expression

For most projects, a case creation date should be set when creating a new case. This date should have today's date.

1. To set a Default Date, select the attribute and click on Default Value Expression, under the Render options. This will open a new window to create the Expression.



2. Create the Expression to set the Date. In this case the expression is to set today's date:

<attribute>=DateTime.Today;



3. Save the form with the new Expression.


Example for a Minimum Value Expression

A Credit Request case can be created only when a person has reached the age of majority.

However this age is not the same in Argentina (which is 21) as in the rest of the countries (which is 18).

To validate the Minimum age a client should have to create a Credit Request case, it is necessary to create an Expression to first check the country and then set a minimum value.

1. To set a Minimum Value Expression, select the attribute and click on Minimum Value Expression, under the Render options. This will open a new window to create the Expression.



2. Create the Expression.


3. Evaluate if the country is Argentina


4. Set the minimum age for both sides: 21 for Argentina, 18 for the rest


5. Save the Form with the new Expression. The web application will evaluate the age entered according to the minimum set.

If the age is smaller than the minimum age, a validation message will be displayed in the form.


<comments />