none
Stuk to generate grouping in EDI-837_Mapping RRS feed

  • Question

  • Hi,

    I am doing a mapping from flatfile to EDI837.
    I am trying to transform output as below but am not getting.

    <Loop2300>
       <record_Loop>
          <record_Loop>
              <Loop2400>
                 <Lx_ServiceLineNumber_2400> 1</Lx_ServiceLineNumber_2400>
                 <Lx_ServiceLineNumber_2400>2</Lx_ServiceLineNumber_2400>
                  <SV1>...........etc
               </>
             </>
          </>

    In source schema there is a unique_subscriber_code for each person. Incoming file may contain same person record more than one time. So i want one record of repeating same person record and clubed all same person LX_serviceLineNumber _2400 record into that single record for each repeating record.

    My Input is :

    anurag,prajesh,12,,,,2222,,0045,,,noida,,,,201301
    anurag,prajesh,12,,,,2222,,0045,,,noida,,,,201301
    anurag,prajesh,12,,,,2222,,0045,,,noida,,,,201301
    anant,Kumar,66,,,,2322,,0046,,,noida,,,,201301
    anant,Kumar,66,,,,2322,,0046,,,noida,,,,201301
    rishi,gaur,24,,,,2422,,0049,,,noida,,,,201301

    Output Should be:

    <ST>
    <BHT>
    <Loop1000A>
    <Loop1000B>
    <Loop2000A>
        <Loop2300>
             <Loop2400>
                  ......
                  ......
                  <LX_ServiceLine_2400>1</LX_ServiceLine_2400>
                  <LX_ServiceLine_2400>2</LX_ServiceLine_2400>
                  <LX_ServiceLine_2400>3</LX_ServiceLine_2400>
             </Loop2400>
         </Loop2300>
    </Loop2000A>
    <Loop2000A>
        <Loop2300>
             <Loop2400>
                  ......
                  ......
                  <LX_ServiceLine_2400>1</LX_ServiceLine_2400>
                  <LX_ServiceLine_2400>2</LX_ServiceLine_2400>
             </Loop2400>
         </Loop2300>
    </Loop2000A>
    <Loop2000A>
        <Loop2300>
             <Loop2400>
                  ......
                  ......
                  <LX_ServiceLine_2400>1</LX_ServiceLine_2400>
             </Loop2400>
         </Loop2300>
    </Loop2000A>

    For grouping same record I am using Muenchian Grouping method. Nut still i am not getting desired output.

    Any help .....




    Thursday, November 19, 2015 5:01 AM

Answers

All replies

  • Hi Anurag,

    Thank you for posting in MSDN forum.

    Could you please share the script you have written in scripting functoid, and also please explain the input and output scenario in some more details.


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Thursday, November 19, 2015 11:42 AM
  • Yes, at some point, you will have to group the records and the most common way is using the Meunchian Method as described in this Wiki Article: http://social.technet.microsoft.com/wiki/contents/articles/17985.xslt-muenchian-grouping-biztalk-complex-transformation.aspx

    However, you cannot combine Meunchian grouping with Links in the Mapper.  It will not work, don't even try.

    The grouping must be done in a separate step before you EDI Map.  Yes, that means two maps:

    1. Map to group the records based on claim*

    2. Map to EDI format

    *You cannot group on Subscriber because a Subscriber may have multiple claims.


    • Proposed as answer by Angie Xu Friday, November 27, 2015 2:37 AM
    • Marked as answer by Angie Xu Friday, November 27, 2015 2:37 AM
    Thursday, November 19, 2015 11:55 AM