Altova MapForce 2022 Enterprise Edition

Logical functions are (generally) used to compare input data and return a Boolean true or false. They are generally used to test data before passing on a subset to the target component using a filter. Nearly all logical functions have the following structure:

 

input parameters: a | b or value1 | value2

output parameter: result

 

The evaluation result depends on the input values as well as the data types used for the comparison. For example, the less than comparison of the integer values 4 and 12 yields the boolean value true, since 4 is less than 12. If the two input parameters contain string values 4 and 12, the lexical analysis results in the output value false, since 4 is alphabetically greater than the first character 1 of the second operand (12).

 

If all input values are of the same data type, then the comparison is done for the common type. If input values are of different types (for example, integer and string, or string and date), then the data type used for the comparison is the most general (least restrictive) of the two.

 

Before comparing two values of different types, all input values are converted to a common data type. Using the previous example, the data type string is less restrictive than integer. Comparing the integer value 4 with the string 12 converts the integer value 4 to the string 4, which is then compared with the string 12.

 

Note:Logical functions cannot be used to test the existence of null values. If you supply a null value as an argument to a logical function, it returns a null value. For more information about handling null values, see Nil Values / Nillable.

 

© 2016-2022 Altova GmbH