Other Functions
first_not_null
(since EVL 2.8)
first_not_null(value1,value2,...)
return first object which is not null. Last value in the list can be fixed value.
For example following example can be used in mapping:
out->value = first_not_null(in->value_field1, in->value_field2, in->value_field3);
which means that in output ‘value’ will be assigned ‘value_field1’ if it is not null, otherwise ‘value_field2’ if it is not null, otherwise ‘value_field3’ (even if it is null).
Example with default value:
out->value = first_not_null(in->value_field1, in->value_field2, in->value_field3, "N/A");
which is the same as previous example, except in case also ‘value_field3’ is null, then string ‘N/A’ is assigned to ‘*out->value’.