none
Issue in getting correct iteration number of 2000A loop in MAP processing using an XSLT script RRS feed

  • Question

  • We are using Microsoft 5010 - 837I schema processing a standard 837I EDI file using BizTalk application.

    We have created an XSLT for some logic where we need 2000A iteration number. Having more than 1 claim in an EDI file with multiple 2000A loops in an EDI file, we are getting 2000A iteration number as 1 even it is processing a record from 2nd or 3rd occurrence from an EDI file.

    Please suggest, where we can find and correct this issue?

    Tuesday, July 12, 2016 6:30 AM

Answers

All replies

  • Hi,

    At High Level from the proof you written, there might be some local variable which you are going to update for each record and assigning / fetching value from each record in loop.

    The possible cause is the variable is not updating properly in custom XSL code or the logic of fetching the record for 2nd and 3rd occurrence is not appropriate.

    please attach the sample data and custom XSL code you have taken for better triage.

    Hope this Helps!!!

    Please Mark as Answered if you satisfy with Reply. 

    • Proposed as answer by vikas.a.mehta Tuesday, July 12, 2016 9:08 AM
    Tuesday, July 12, 2016 9:08 AM
  • You don't need to use Xslt.  All you need is two counter variables.

    This blog describes what you need:

    http://inotekgroup.com/mapping-an-837p-with-an-hl-looping-structure/

    • Proposed as answer by Arindam Paul Roy Tuesday, July 12, 2016 1:36 PM
    • Marked as answer by Angie Xu Monday, July 25, 2016 5:58 AM
    Tuesday, July 12, 2016 12:08 PM
  • Thanks for your response. Please find more details on same issue.

    MS 837D EDI schema structure as below

    <837D>

    <ST></ST>

    <BHT></BHT>

    <1000A></1000A>

    <1000B></1000B>

    <2000A> …

    <2000B>…..

    <2300> …..

    <2320> … </2320>

    <2400> … </2400> …..

    </2300>

    </2000B>

                    </2000A>

    <2000A> …

    <2000B>…..

    <2300> …..

    <2320> … </2320>

     <2400> … </2400> …..

    </2300>

    </2000B>

    <2000B>…..

    <2300> …..

    <2320> … </2320>

    <2400> … </2400> …..

    </2300>

    <2300> …..

    <2320> … </2320> <2320> … </2320>

    <2400> … </2400> <2400> … </2400> …..

    </2300>

    </2000B>

    </2000A>

    <SE></SE>

    </837D>

    Some more details on this schema from Microsoft –

    • 2000A loop can repeat more than 1 (Unbounded)
    • 2000B loop can repeat more than 1 (Unbounded)
    • 2300 loop can repeat more than 1 (Max. 100)
    • 2320 loop can repeat more than 1 (Max. 10)
    • 2400 loop can repeat more than 1 (Max. 50)

    We are using this MS schema to process standard 5010 837D EDI file and creating an XML having specific format.

    Now in MAP processing we are using a scripting functoid having XSLT script where we are trying to get an Iteration (loop) value (using an Iteration functoid) for these different loops at run time to take appropriate decision for creating required output data. For 2000A loop we are getting Iteration value as 1 for all repetition of this 2000A loop. But for other loops we are getting appropriate Iteration value at run time.

    Wednesday, July 13, 2016 8:48 AM
  • Well, we don't need any more detail.  I've done exactly this, many, many times, as have other contributors.

    All you need are the Functoids described in my previous post.  You do not need to use Xslt, that just makes it much more complicated that it needs to be.

    Again, exactly what you need is described here: http://inotekgroup.com/mapping-an-837p-with-an-hl-looping-structure/

    Wednesday, July 13, 2016 12:33 PM