Reading destination element inside scripting functoid

Home Page Forums BizTalk 2004 – BizTalk 2010 Reading destination element inside scripting functoid

Viewing 1 reply thread
  • Author
    Posts
    • #23158

      Hi All,

      Please have look at this map

      Source-A               Destination-B

      Recoed

      X1                            D1

      X2                            D2

      X3                            D3

      X4                            D4

      Now I want to satisfy the below conditions in mapping.

      If X1==’KT’ || X2==’MT’

            Map X2–>D1

      If X1=(‘RM’ && (D1 ==null || D1==””))

            Map X2–>D1

      Please note that, I have implemented the  below  logic for above case,

      If X1==’KT’ || X2==’MT’

            Map X2–>D1

      else If X1=(‘RM’ && !(X1==”KT” || X1==”MT”))

            Map X2–>D1

      This is working for first first two elements(X1, X2) and D1 is mapped with X2.

      Now I have Implemented same logic for X3 and X4.

      If X3==’KT’ || X3==’MT’

            Map X4–>D1

      else If X3=(‘RM’ && !(X3==”KT” || X3==”MT”))

            Map X4–>D1

      Please note, destination should be same.

      As  a result I am getting muliple records for  D1 i.e, X2 and X4,X6 etc , because source scripting functoids returning the nodes X2, X4, X6 etc when the condition met.

      Not sure how to implement this, but I thought of taking the recently mapped destination node using Xpath inside a scripting functoid should work.

      In otherwords I want to get the D1 value which is mapped recently  inside a scripting functoid using  Xpath.

      Should It work with Xpath, like reading an element from schema in an orchestration using Xpath.

      If possible plz help me. Please correct me If am going wrong.

       

      Thanks inadvance,

      [:)]

       

       

       

       

       

       

    • #23187

      The mapper does not allow access to the destination nodes. This is a restriction of Xslt, not a Biztalk specific restriction.
      I am not sure I follow your logic

       else If X1=(‘RM’ && !(X1==”KT” || X1==”MT”)) 

      you appear to anding a boolean with a string, should this read

      if ((X1 == ‘RM) && !(X1==”KT” || X1==”MT”))

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.