# Concat string fields in various rows to a single row

**URL:** <https://forum.cloverdx.com/t/concat-string-fields-in-various-rows-to-a-single-row/2154>\
**Category:** CloverDX Platform\
**Created:** [January 15, 2024, 9:33pm UTC](https://forum.cloverdx.com/t/concat-string-fields-in-various-rows-to-a-single-row/2154 "2024-01-15T21:33:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabien\_Carrion](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/fabien_carrion/32/165_2.png) [@Fabien\_Carrion](https://forum.cloverdx.com/u/Fabien_Carrion)\
**Post date:** [January 15, 2024, 9:33pm UTC](https://forum.cloverdx.com/t/concat-string-fields-in-various-rows-to-a-single-row/2154/1 "2024-01-15T21:33:50Z")

</div>

Hello,

I was expecting the aggregator step transform to be able to concat a string field and give back only one big string.

How could I achieve that?

Thanks

---

<div class="post-metadata">

**Author:** ![Tomas\_Pavlas](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.cloverdx.com/tomas_pavlas/32/170_2.png) [@Tomas\_Pavlas](https://forum.cloverdx.com/u/Tomas_Pavlas)\
**Post date:** [January 17, 2024, 10:41am UTC](https://forum.cloverdx.com/t/concat-string-fields-in-various-rows-to-a-single-row/2154/2 "2024-01-17T10:41:21Z")

</div>

Hi Fabien,

There are more ways to achieve concatenation of all string fields in CloverDX. The most common way is to use the Denormalizer component which is designed to join data fields.  
_See our documentation about the Denormalizer_ [_here_](https://doc.cloverdx.com/latest/designer/denormalizer.html)_._

As an example, I created a simple table of data that looks like this:

 ![](https://canada1.discourse-cdn.com/flex007/uploads/cloverdx1/original/1X/67086fa9a673fe2108a7e2216ea3eefb13eb8058.png)

In the Denormalizer, in _Denormalize_ field you can use a CTL code that looks like this:

// This creates 3 lists of strings  
**string** fields1;  
**string** fields2;  
**string** fields3;

**function**  **integer**  **append** () {

```
  //This snippet will fill the lists with data from all fields  

```

**append** (fields1, \*\*$in.\*\*0.field1);  
**append** (fields2, \*\*$in.\*\*0.field2);  
**append** (fields3, \*\*$in.\*\*0.field3);  
//return length of the lists

**return**  **length** (fields1);  
}

**function**  **integer**  **transform** () {

//In the transform function itself we use the JOIN function to print  
//those lists as one single field using different delimiters defined  
\*\*$out.\*\*0.field1 = **join** (“”,fields1);  
\*\*$out.\*\*0.field2 = **join** (" “,fields2);  
\*\*$out.\*\*0.field3 = **join** (”;",fields2);

```
 **return**  **OK** ;  

```

}

See our documentation about string functions [here](https://doc.cloverdx.com/latest/designer/string-functions-ctl2.html).

The result then could look like this:  
 ![](https://canada1.discourse-cdn.com/flex007/uploads/cloverdx1/original/1X/b4d25f8ed0709adf099c821b181ae683124fe8b2.png)  
I hope this will help.

Best regards, Tom.
