PROPERTY
expressions return properties
(name-value pairs). They are typically used to provide data to other
expressions. The
PROPERTY NVL
expression evaluates its sub-expressions and returns the
properties from the first sub-expression that has a non-empty result.
This is useful if there are several different properties that a record
may or may not have, but only one of them should be used in an expression. For
example, a record may have a property for a home address or for a business
address.
PROPERTY NVL
expression evaluates each possibility and
returns the first address it locates.
Note that a sub-expression that returns empty strings is returning
values (empty values). For example, a record may not have a value for the
“Color” property; however, if the
FILTER_EMPTY_PROPS
attribute of the
RECORD_ADAPTER
is not set to true, an identity
expression referencing the property "Color” still has a return value (that is,
the property name “Color” with an empty value).
An NVL expression may therefore return properties with empty values;
it skips only properties that do not exist. There are no
EXPRNODE
elements to configure
PROPERTY NVL
.
See the
EXPRESSION
element for DTD and attribute information.
As suggested in the above example, this expression returns the first address property that Forge locates in the record.
<EXPRESSION TYPE="PROPERTY" NAME="NVL"> <EXPRESSION TYPE="PROPERTY" NAME="IDENTITY"> <EXPRNODE NAME="PROP_NAME" VALUE="address_home"/> </EXPRESSION> <EXPRESSION TYPE="PROPERTY" NAME="IDENTITY"> <EXPRNODE NAME="PROP_NAME" VALUE="address_work"/> </EXPRESSION> </EXPRESSION>