Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference  CONTAINSERRORS 
Functions and Expressions Reference Guide 
74 
CONTAINSERRORS 
The CONTAINSERRORS function tests a valid object to see whether it contains any 
objects in error. 
Syntax 
CONTAINSERRORS (single-object-expression) 
Meaning 
CONTAINSERRORS (object_to_test) 
Returns 
This function returns TRUE or FALSE 
Returns TRUE if any object contained in object_to_test is in error 
Returns FALSE if the object_to_test is completely valid 
Note  The input object, itself, is a valid input object. This function does not evaluate 
for invalid objects. So, if you have this map rule: 
 CONTAINSERRORS ( Invoice:InputFile ) 
 If Invoice[1] is valid, Invoice[2] is invalid, and Invoice[3] is valid, 
CONTAINSERRORS evaluates only twice; once for each valid instance of 
Invoice. 
Example 
Msg (s) = IF ( CONTAINSERRORS ( Msg:MailBag ) & 
 Type:Msg:MailBag = "PRIORITY" , 
 Msg:MailBag , 
 NONE ) 
In this example, if Msg:MailBag contains any object in error and 
Type:Msg:MailBag has a value of PRIORITY, Msg:MailBag is mapped; 
otherwise, NONE is returned for this occurrence of Msg. This map rule returns 
all valid Msg’s that contain errors with a Type of PRIORITY. 










