Skip to main content Skip to complementary content

Mapping matching loops

Map an input loop to a matching output loop.

Before you begin

You have created a map with an input and output structure. For this example, you can use Other Projects > Examples > Structures > Simple > MaAndPaSupplier > MandPPOFile as input and Other Projects > Examples > Structures > Simple > POStandard > SimpleShipNoticeFile as output.

About this task

In this example, the input PurchaseOrder loop needs to be mapped to the output Notice loop.

This map is available in Other Projects > Examples > Maps > Looping > LoopSimple.

Procedure

  1. Drag the input PurchaseOrder to the output Notice.
    The Num element is mapped automatically, and a SimpleLoop function is added to the Notice loop and uses a reference to the input PurchaseOrder loop as an argument.
  2. Drag the input LineItems to the output Items.
    The elements are mapped automatically and a SimpleLoop function is added to Items.
  3. Optional: Map other elements as needed.

Results

The loops are mapped, you can use the Test Run button to see the output based on the sample input file. In this example, the output looks like this:
<Notices>
  <Notice>
    <Num>1</Num>
    <Items>
      <PartNum>1</PartNum>
      <Quantity>1</Quantity>
    </Items>
    <Items>
      <PartNum>2</PartNum>
      <Quantity>13</Quantity>
    </Items>
  </Notice>
  <Notice>
    <Num>1</Num>
    <Items>
      <PartNum>89</PartNum>
      <Quantity>500</Quantity>
    </Items>
    <Items>
      <PartNum>10S334</PartNum>
      <Quantity>1000</Quantity>
    </Items>
  </Notice>
  <Notice>
    <Num>2</Num>
    <Items>
      <PartNum>1A6</PartNum>
      <Quantity>100</Quantity>
    </Items>
    <Items>
      <PartNum>558</PartNum>
      <Quantity>130</Quantity>
    </Items>
  </Notice>
</Notices>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!