FlatFile Schema - multiple rows

i am using flatFIle schema and convertToString to create a flatfile.

My document is with below structure

... ... .... ...

I created a flatfile schema with following Field Definitions
Order
OrderItems
OrderItem

I am able to create the flatfile with all the data - multiple orderItem, but with a record of empty row due to the ‘OrderItems’ Record Definition. But i am not able to remove it as it is needed to map ‘ForEach’ OrderItems record and pass it to the converttoString. How do i able to archieve this - create the flatfile with Order and multiple OrderItem, without empty row.

Order
OrderItem
OrderItem
OrderItem

Thanks

Hi Jimmy,

If I understand your requirement correctly, you have a list of order items under the order document, and one of the orderItem is empty.

Can’t you exclude that order item while mapping the data to the document, and then use it for further operations like ForEach, generate flat file using convertTostring service.?

Regards,
Firoz N

Thank you Firoz

No, it is not one of the orderItem is empty. It is cause by the field Definition ‘OrderItems’. It create a row of record. But if i remove it, the OrderItem under it will all not created.

Hi Jimmy,

please provide a sample (or screenshot) of your document structure as well as the ff dictionary and ff schema definitiion.

<Order>
<OrderItems>
<OrderItem/>
<OrderItem/>
...
<OrderItem/>
</OrderItems>
</Order>

Structure should look similar to this one above (using XML Syntax).

Regards,
Holger

Hi Holger

I managed to solve the issue by mapping and tweak the XML structure, so that it match with my FFSchema. Surprise it work this way.

Many thanks

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.