Showing results for 
Search instead for 
Do you mean 

CONCATENATE functional attribute expression results in incomplete / truncated output attribute value

by Technical Evangelist ‎10-12-2016 01:05 PM - edited ‎04-05-2017 12:42 PM (1,127 Views)

Symptoms

When using Aggregation with a Functional Attribute expression to CONCATENATE attribute values of type Text, the result is an incomplete (i.e. truncated) output value.

 

Diagnosis

The maximum character length for an attribute of type Text is 255 characters. Therefore when using the CONCATENATE function to aggregate a number of Text attributes the resulting attribute may exceed the 255 character limit causing truncation.

 

The solution is to CAST the attribute being concatenated as a Memo type instead of a Text type thus increasing the number of characters available for the output attribute to that supported by a Memo field.

 

The CONCATENATE function is typically used in conjunction with the Aggregation command to aggregate attributes from multiple detail features to a single summary feature.   A standard CONCATENATE function as created via the Functional Attribute dialog from the Output tab of Aggregation might appear as follows:

 

CONCATENATE(',', Detail.Attribute1)

 

This expression indicates that the values from the Attribute1 attribute (which is of type Text in this example) will be concatenated using a comma (,) as separator between the attribute values in the resulting output field. Because the data type for the Attribute1 field is Text then the resulting attribute created will be of type Text as well (meaning the maximum length of the concatenated output value will be 255 characters). 

Solution

To increase the number of characters available for the output value, the expression can be modified to CAST the ‘Attribute1’ field as a Memo data type (so that the output field will be Memo). The expression with the CAST function included will appear as:

 

CONCATENATE(‘,’, CAST(Detail.Attribute1, Memo))

Contributors