cancel
Showing results for 
Search instead for 
Did you mean: 

New line in XI

Former Member
0 Kudos

Hi,

In my message mapping, i m having structure :

header

child1

child2

child3

Now i want output in text file after mapping:

child1

child,child

How can i do it?

For more clear i m giving example here.

The value will be after mapping of child will like :

[sunil]

1

hi

so in text i want

[sunil]

1,hi

Means after one child i want new line and after all will come in single line ,separated by comma "," .

Accepted Solutions (1)

Accepted Solutions (1)

former_member192798
Active Contributor
0 Kudos

Hi Sunil,

Wherever you want a new line, specify NameA.fieldSeparator = 'nl'

I hope this provides you a solution.

Regards.

Praveen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sunil,

Use text function ConCat and give the delimeter as (,).

child1

child2 Concat child1,child2

This is very simple and it will work for your case.

Please check it and let me know if any issues.

Regards,

Ranjeeth.

Former Member
0 Kudos

Sunil,

If you are using receiver file adapter, this is not possible. May be you can change the data type a little to achieve the desired output.

Like

header1

--child1

header2

--child2

--child3

Now you may give the content conversion paramters like this:

header1.fieldNames child1

header1.fieldSeparator ,

header1.endSeparator 'nl'

header2.fieldNames child2,child3

header2.fieldSeparator ,

header2.endSeparator 'nl'

Regards,

Jai Shankar.