Numeric range

The Behaviour type Numeric range checks whether the return value of an element to be evaluated is a numerical value that is defined in the value range specified by the integer parameter Min. value and Max. value.

images/download/attachments/189432485/image-2024-10-2_16-0-41-version-1-modificationdate-1727877641406-api-v2.png

  • If no element is linked, the executing element is considered the element to be evaluated.

  • If an element is linked, then the linked element is considered the element to be evaluated.

If the element to be evaluated returns a numerical value that fulfils the condition Min. valueNumeric valueMax. value, then the Actions on 'true' are executed.

If the element to be evaluated does not return a numerical value or a value outside the numeric range, then the Actions on 'false' are executed.

In both cases, any input data is passed on to the actions as $input.

Example

Depending on the 'Goods value' of a shipment line item, insurance is either optional, mandatory or not applicable. Accordingly, the state of a Check box (Insurance?) should change automatically depending on the value of the goods according to the following table:

Rule

Min. value

Max. value

Status of the 'Insurance?' checkbox

Under €100 goods value, no insurance will take effect.

0

100

invisible and not set

Between €100 and €999.99, insurance is optional.

100

1000

visible and active

From €1000 goods value, insurance of the goods is mandatory.

1000

999999

visible, inactive and set

Runtime example:

images/download/attachments/189432485/image2020-6-4_14-36-22-version-1-modificationdate-1727877346907-api-v2.png

Configuration:

images/download/attachments/189432485/image2020-6-4_14-38-57-version-1-modificationdate-1727877346912-api-v2.png

Three behaviours are configured for the 'Goods Value' Text field, the configuration of which corresponds to variants of the expanded behaviour on the left:

  • The behaviour reacts to the Triggering event Changed with all Change types. The manipulation of the 'Insurance?' Check box becomes valid per keystroke.


  • The Behaviour type Numeric range is parameterised differently in each behaviour (see table above). In the image, the interval [0.100] is defined as the value range.


  • Under the Actions on 'true', the actions Hide element and Set value ensure the required status of the checkbox. In the other behaviours, Show element, Enable element and Disable element are used in the same place (see table above).

NOTE◄ Since Min. value and Max. value only accept integer values, whereas the test values can contain decimal places (Euros-Cents), the intervals were delimited with overlapping (see table above). Since the behaviours are processed according to the order selected in the configuration, specifications for the 'higher value' intervals are effective for any borderline cases (goods value of exactly: €100 or €1000) as far as this concerns the 'Insurance?' Check box. However, it should be borne in mind that in borderline cases, the actions of both applicable behaviours are carried out, e.g. in the case of Show alert, because in borderline cases two contradictory notices, such as 'Insurance mandatory' and 'Insurance optional' could appear.