AnsweredAssumed Answered

Combine duplicate line items

Question asked by fortyfive on Apr 14, 2016
Latest reply on Oct 8, 2017 by nikhyada


Hi All,

 

How can I total line item data together? I have duplicate line numbers going into a map and I would like to total the qty of each duplicate line #. Here is the data I am getting back after the map and a example of what I need to update in Netsuite.

 

Original data

<ns1:item>

      <ns1:orderLine>1</ns1:orderLine>

      <ns1:itemName>item1</ns1:itemName>

      <ns1:location internalId="5" />

      <ns1:quantity>400</ns1:quantity>

    </ns1:item>

    <ns1:item>

      <ns1:orderLine>2</ns1:orderLine>

      <ns1:itemName>item2</ns1:itemName>

      <ns1:location internalId="5" />

      <ns1:quantity>400</ns1:quantity>

    </ns1:item>

      <ns1:item>

      <ns1:orderLine>1</ns1:orderLine>

      <ns1:itemName>item1</ns1:itemName>

      <ns1:location internalId="5" />

      <ns1:quantity>25</ns1:quantity>

    </ns1:item>

 

Example of what I'm trying to accomplish

<ns1:item>

      <ns1:orderLine>1</ns1:orderLine>

      <ns1:itemName>item1</ns1:itemName>

      <ns1:location internalId="5" />

      <ns1:quantity>425</ns1:quantity>

    </ns1:item>

    <ns1:item>

      <ns1:orderLine>2</ns1:orderLine>

      <ns1:itemName>item2</ns1:itemName>

      <ns1:location internalId="5" />

      <ns1:quantity>400</ns1:quantity>

    </ns1:item>

   

 

Thanks,

Outcomes