none
Mapping Problem. RRS feed

  • Question

  • Hi All,

    I am completely new to Biztalk and EDI. I learned some tutorials about Biztalk and then tried batching concept, every thing went good. I got the requirement to produce EDI 850 message with following pattern.

     

    N1

    PER

    N1

     

    i.e., In N1 loop i want to show N1 twice but PER field for only one time. I tried with table looping factoid along with scripting factoid. My scripting factoid return nothing if it is second iteration for PER field. But i am getting output like this.

    N1|BT|Metropolitan ID|92|C019~

    PER|BD|Craig Hunter~

    N1|ST|Metropolitan ID|91|110602~

    PER~

     

    The Second PER field appears without any values.

    Here is the coding which i have used in my scripting factoid.

    public string MyConcat(int param1)

    {

    if(param1==1)

    return "BD";

    else

    return "";

    }

    Any Help or ideas??

     

     

     

    Friday, February 18, 2011 5:34 AM

Answers

  • You need a looping functoid along with a condition functoid. That will solve the problem.

    1. Take out the scripting funcotoid
    2. Link the source node to a looping functoid. Link the same functoid to the destinaiton root node. In your case to the root of PER. NOT PER01 or PER02, the root of PER 
    3. Place an = functoid and connect it to the same source node and the same destination node.
    4. Thats it.

    Try it and let me know how it goes.


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Friday, February 18, 2011 1:13 PM