# Problem with convertToString service and outbound flat file

**URL:** <https://techcommunity.softwareag.com/t/problem-with-converttostring-service-and-outbound-flat-file/107662>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [May 18, 2004, 8:15pm UTC](https://techcommunity.softwareag.com/t/problem-with-converttostring-service-and-outbound-flat-file/107662 "2004-05-18T20:15:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [May 18, 2004, 8:15pm UTC](https://techcommunity.softwareag.com/t/problem-with-converttostring-service-and-outbound-flat-file/107662/1 "2004-05-18T20:15:21Z")

</div>

Hello,  
i’m a beginner on webMethods 6.01 and french too. Good luck to understand. My flat file schema is following:

|header (record reference; 1 occur)  
\*field def1 (position 0)  
\*field def2 ( 1)  
|mesure (record reference; unlimited)  
\*field def3 (position 0)  
\*field def4 ( 1)

RecordParser: delimiter  
Record Character: \n  
field: ;

I want to transform this in a cvs file with the service pub:flatfile:convertToString. The problem is the result in the string output with this service. In fact, the record reference (header and mesure) overwrite the first values of fields. Like this:  
headerfield2  
energyfield4  
energyfield4

If i set the position field to the number of character of header (it is 6 char here) + 1 and the number of character of energy +1, so the values are extract after the name of the two fields. Like this:  
header;field1;field2  
energy;field3;field4  
energy;field3;field4  
…  
And it’s good but the schema is so static. An idea to resolv this problem. Thx. See you  
Roum

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [May 18, 2004, 10:30pm UTC](https://techcommunity.softwareag.com/t/problem-with-converttostring-service-and-outbound-flat-file/107662/2 "2004-05-18T22:30:11Z")

</div>

Can you elaborate more on the above positive result part?

And before mapping convertToString are you seeing the header and mesure(list) fields correctly as expected in the pipeline.  
what parameters are you setting in the convertToString service?

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:04pm UTC](https://techcommunity.softwareag.com/t/problem-with-converttostring-service-and-outbound-flat-file/107662/3 "2021-04-02T15:04:53Z")

</div>


