Skip to main content

Hi, I have 2 attributes that are text from a pair of text files, i want to combine them into a single attribute.

 

I'm using an attribute text file readers to pick out the text, then creating an attribute for each of the text_line_data ouputs and naming them initial (first file contents):

 

imageFirst string contents:

******************************************************************************

  THE FIRE TROUBLE CIRCUIT IS REPORTING A MALFUNCTION! 

 ******************************************************************************

3

 

and extended (second file contents - second file's filename is contained inside the first file, hence the extra processing):

imageSecond file contents:

THIS INDICATES A MALFUNCTION OF THE FIRE SYSTEM

MONDAY THRU FRIDAY, 8:00 TO 4:30 PM, PLEASE NOTIFY Bob

MAINTENANCE DISPATCH AT XXX-XXXX

ALL OTHER TIMES, NOTIFY THE TELEPHONE OPERATOR.

 

 

i'm then using stringconcatenator to combine the two file's contents with a new line between:

 

imageMy expected result here would be - _results looking something like:

 

******************************************************************************

 THE FIRE TROUBLE CIRCUIT IS REPORTING A MALFUNCTION! 

 ****************************************************************************** 3

THIS INDICATES A MALFUNCTION OF THE FIRE SYSTEM

MONDAY THRU FRIDAY, 8:00 TO 4:30 PM, PLEASE NOTIFY Bob

MAINTENANCE DISPATCH AT XXX-XXXX

ALL OTHER TIMES, NOTIFY THE TELEPHONE OPERATOR.

 

 but i'm getting them as separate outputs:

image 

not sure where i am going wrong here?

 

The StringConcatenator works by joining two fields within the same feature, rather than across features.

 

You could adapt your workspace by simply adding a FeatureMerger (Requestor =1, Supplier=1) right before your StringConcatentor. This will combine your two features into one feature, which can then be concatenated. imageimageNote that you may have to insert two New Lines into your StringConcatenator to emulate the above line break.


The StringConcatenator works by joining two fields within the same feature, rather than across features.

 

You could adapt your workspace by simply adding a FeatureMerger (Requestor =1, Supplier=1) right before your StringConcatentor. This will combine your two features into one feature, which can then be concatenated. imageimageNote that you may have to insert two New Lines into your StringConcatenator to emulate the above line break.

oooooh. that would explain it. thanks, that worked perfect!

 

 


Reply