I have the following looping segment in the input message
<PID>
<Item_Description_Type>DESCRIPTION Line 1</Item_Description_Type>
<Item_Description>This is a description of product 1</Item_Description>
</PID>
<Item_Description_Type>DESCRIPTION Line 2</Item_Description_Type>
<Item_Description>This is a description product 2</Item_Description>
Target looks like
<Desc1>
<Description_tag_1>
<Description_text_1>
</Desc1>
<Desc2>
<Description_tag_2>
<Description_text_2>
</Desc2?
My task is to map each iteration of the source segment to one of the target segments. I am outputting to a fixed position(rows) flatfile This is easy enough but problem lies in the fact that I need both of these target segments to output everytime regardless if the PID segment exists for both.
I was thinking the Table Looping functoid would work, however I am not sure how to incorporate this because I still need some kind of logic that keeps track of how many iterations have occured. if only 1 PID has occurred, I still need the second DESC2 segment to kick out essentially a blank record (first field is hardcoded so wont really be blank)
My table looping is working fine, just need that added logic to boot the rest of it
FC thanks you