Skip to main content

Minimum and maximum values

Minimum and Maximum Values

It is a common requirement to validate a numeric input against a minimum and/or maximum value, specifically for Number, Money, or Date controls in Bizagi. To accommodate this, Bizagi provides Minimum and Maximum properties.

The Minimum and Maximum value properties are found in the Advanced tab of the control's Properties.

These properties allow the values to be set by:

  • Entering text
  • Selecting a value
  • Associating an expression

The value, set by any of these methods, will be displayed in the property's description area.

If the end user input does not fall within the range of minimum and maximum boundary values, a validation message will display.

Note: Keep in mind that the type of value returned in the expression must coincide with the type of value that the control manages (e.g., dates with dates, integer with integer). If they are different, errors may occur in the execution of the form.

Note: If you are using an expression, its name will be displayed on the left. If the name is too long to fit in the box, hover with the mouse, and a tooltip with the complete name will display.

Example: Define Minimum and Maximum Boundary Values for a Money Control

In a Credit Request process, the amount to be requested must be at least 100 US dollars. Also, the maximum amount allowed is ten times the monthly income of the applicant.

In the Credit Request Process Entity, the Monthly income and the Requested Amount property values are stored in attributes with the same name.

  1. In the Forms Designer, go to the Requested Amount control properties and open the Advanced tab.

    Requested Amount Control Properties

  2. In the Minimum property, type the value of 100.

    Minimum Value

  3. Select the Maximum property and click the expression icon (FormsComponents151) to associate an expression.

    Expression Icon

  4. In the Expression Module, define the maximum threshold based on the monthly income.

    The expression would be: <CreditRequest.MonthlyIncome>*10;

    Expression Module

  5. Save the expression and close the form.

  6. Proceed to test your validations in the Work Portal.

    • Enter a value lower than 100 in the Requested Amount Control. When clicking Next, a validation message will display.

      Validation for Less than 100

    • Now, enter a value higher than ten times the monthly income of the applicant. When clicking Next, the validation message will display.

      Validation for More than Maximum

Example: Define Minimum and Maximum Boundary Values for the Date Control

In a Vacation Leave Request process, an employee must request vacation at least 15 days in advance. Additionally, a stipulation exists where requests submitted after December 30th, 2012 will not be processed.

The official working day on which the vacation commences is stored in the Leaving Date attribute within the Vacation Request Process Entity.

  1. In the Forms Designer, select the Properties of the Leaving Date control and open the Advanced tab.

    Leaving Date Control Properties

  2. In the Maximum property, select the December 30th entry from the calendar.

    Select December 30

  3. Select the Minimum property and click the expression icon (FormsComponents151) to associate an expression.

    Expression Icon for Date

  4. In the Expression Module, define the minimum value allowed (15 days in advance) based on the current date.

    The expression would be:

    var Today = DateTime.Today;
    var Max = Today.AddDays(15);
    Max;