BizTalk Mapper - Looping multiple nodes to map to a single node in a single row (flat file)

Hi everybody,
I'm still new in developing BizTalk app and require some help in this one problem. Appreciate your time and input to help me on this.
Basically I have an XML document as input and a flat file as output. Example for input is as per below. The "Contact" node's maxOccurs here is set to unbounded and could be multiple. (phone, fax, website, telex ...)
<root>
<CustomerName>Company A</CustomerName>
<Contact>
<Type>Phone</Type>
<Locator>03566789</Locator>
<Type>Phone</Type>
<Locator>03566790</Locator>
<Type>Fax</Type>
<Locator>03566795</Locator>
<Type>Telex</Type>
<Locator>03566798</Locator>
<Type>Website</Type>
<Locator>www.companyA.com</Locator>
</Contact>
</root>
The expected output in XML would look like below. The final outcome would be a csv file. Strictly Phone 1, phone 2, fax and telex, the rest would be ignored.
<root>
<CustomerName>Company A</CustomerName>
<Phone1>03566789</Phone1>
<Phone2>03566790</Phone2>
<Fax>03566795</Fax>
<Telex>03566798</Telex>
</root>
Example of expected output result (csv file): CompanyName;Phone1;Phone2;Fax;Telex;
In our case here: Company A;03566789;03566790;03566795;03566798;
Another example could be: Company B;036778911;;036778912;; if only 1 phone number and 1 fax number provided.
I've used Table Looping and Table Extractor and nearly got the desired result except that it is represented in multiple rows instead of one: Example:
Company A;03566789;;;
Company A;;03566790;;;
Company A;;;03566795;;
Company A;;;;03566798;
Any idea how to do the mapping? I'm kind of stuck here and it sounds like an easy problem but i could not find any example to the solution that I need here. Table looping and table extractor is ok to map from single node flat file to multiple nodes but not
the reverse like in this example.
rgds,
sportivo

Hi,
Please refer to below links where similar issue has been answered.
http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/ecdff241-6795-4a95-bad7-48fca4410dfb
http://www.epinaki.com/2011/05/other-options-to-using-biztalk-table-looping-functoid-par-i/
I hope this helps you.
Thanks With Regards,
Shailesh Kawade
MCTS BizTalk Server
Please Mark This As Answer If This Helps You.
http://shaileshbiztalk.blogspot.com/

Similar Messages

  • Mapping Error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY when attempting to Upsert from a Flat File source to SFDC Account and Contact target

    I'm getting an INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY error when running a mapping that attempts to Upsert data from a Flat File to SFDC Account and Contacts.  I also tried to split The error message for Account: WRITER_2_*_1> WRT_8164 [2015-07-26 08:49:57.707] Error loading into target [Account] : Error received from salesforce.com.  Fields [].  Status code [INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY].  Message [Please enter a value for Country].WRITER_2_*_1> CMN_1053 [2015-07-26 08:49:57.707] : Rowdata: ( RowType=1(update) Src Rowid=1 Targ Rowid=1 Upsert is based on the External ID: Account_External_ID__c The error message for Contact: WRITER_1_*_1> WRT_8164 [2015-07-26 08:49:55.305] Error loading into target [Contact] : Error received from salesforce.com.  Fields [].  Status code [INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY].  Message [Please enter a value for Country].WRITER_1_*_1> CMN_1053 [2015-07-26 08:49:55.305] : Rowdata: ( RowType=0(insert) Src Rowid=1 Targ Rowid=1 Upsert is based on the External ID: Contact_External_ID__c Any ideas on how to proceed?

    Hello,Can you please help me understand that limitations of the free data loader? In this link  - http://www.informaticacloud.com/editions-integration.html# - I see the below features listed.No-code, wizard driven cloud integrationMulti-tenant SaaS solutionDatabase and file ConnectivityFlexible schedulingBulk API support (for Salesforce.com)Unlimited rows/day24 jobs/day1 Secure AgentLimited to 1 userCommunity supportCloud Data MaskingQuestions:When I view licenses in my free data loader, under Feature Licences, it shows the License type for Salesforce Connectivity/Bulk API as “Trial”. Can’t I create a scheduled Data Synch task to upsert records in Salesforce using Bulk API mode?Is the email notification option (for success, warning and failure of data synch task) available on the free version (and not as a trial)?I understand there is a limit of 24 jobs/day. But is there a limit on the number of scheduled data synch tasks that can be created?Data Masking is listed as a feature above for the free edition. However, when I view the licenses in my free data loader, Data Masking is shown as “Trial”. Can you please clarify this?Is there a limit on the number of Connections that can be created?ThanksSanjay

  • Mapping issue: Two different IDOC P19 segment to one flat file line

    Hello,
    Scenario: For each P01 segment (without uepos) in an order idoc I want to create one line in a plain text file.
    Problem: One P01 segment has two P19 segement with different qualifiers. I want to map both P19.IDNTR (with different qualifiers) fields to the same record in my plain text file.
    How can I do this?
    My "if statement" does noet work. I check the qualifier in the P19 segment. But when one field in the record of the plain text is filled with an P19.IDTNR the second P19.IDTNR field is empty.
    Please advice.
    Best Regards,
    Erik van Lisdonk

    Erik,
    you should get both values if you change the Context of your INPUT-Fields one level higher (for the IDTNR and for the Qualifier that is checked in the IF-statement).
    The Context needs to be set to P01 for all fields and I assume it is set to P19.
    Greetings
    Stefan Hilpp

  • Parent node showing in schema when child nodes not present

    I had several folks answer my questions on mapping from a flat file to an EDI 835 schema and I am down to just a couple of issues before I finish up. I have a conditional mapping issue that I have to solve before I can map the rest of the document. I am
    mapping three fields in a single non-repeating line in the flat file to a repeating segment in the 835. Basically I need to create a separate AMT_ClaimSupplementalInformation segment for each field in the flat file line. As you can see in the picture
    below I want to create a AMT_ClaimSupplementalInformation segment for CDISCOUNT, CINELIGIBLE and CALLOWED.
    You can see I have quite a bit of conditional logic attached to the three fields, but I have all three connected via a loop to the AMT_ClaimSupplementalInformation parent. I cannot attach the loop to the parent of the three fields because it only appears
    once in the file. And if I leave the loop out the AMT segments get stacked funny, like this:
    <AMT_ClaimSupplementalInformation>
    AMT1
    AMT1
    AMT2
    AMT2
    </AMT_ClaimSupplementalInformation>
    You can see how they should be stacked in the next pic.
    In some cases however, one of those fields may be blank so I will not need to create a AMT_ClaimSupplementalInformation segment for it. I was able to use some conditional mapping ideas you guys gave me using the Not-Equal and Value Mapping functoids, and
    that works great to keep blank child nodes from being created. However, Since I have a loop attached to the AMT_ClaimSupplementalInformation parent node it still creates an empty parent node even when the child nodes are not created. See the empty parent
    node in the pic below.
    Since looping functoids can only be attached to links I don't know how to make the parent node conditional.
    Any suggestions?
    Thanks.

    Boatseller, thanks for the tip. I did end up going the XSLT direction. It's a bit of a hack, but I'm using the following XSLT to eliminate empty nodes :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="@*|node()">
            <xsl:if test=". != ''">
                <xsl:copy>
                    <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>
    I created a new map with the 835 schema on each side. I then created an XSLT file and pointed to it in the Custom XSLT Path property. It seems to work well. I call this map right after my FlatFile_To_835 map.
    I was hoping to use the scripting functoid with inline XSLT in the map so that I didn't have to worry about deploying the XSLT file(just another thing to keep up with in the future), but when I compile it I get the following error:
    The "Scripting" functoid has 1 input parameter(s), but 2 parameter(s) are expected.
    I'm wondering if I'm connecting the schemas incorrectly in the map:
    In any case, I'm past the empty nodes issue for now, which was a big roadblock. Now I have to deal with the CAS segments which are, as you said, a real pain. 
    Thanks for all of your input.

  • Error while trying to process multiple Recordsets in Flat file.

    Hi All,
    I am working on Flat File to Flat File scenario and my structure is as follows.
    Recordset
         Record1
              Field1
              Field2
         Record2
              Field3
              Field4
         |
         Record9
              Field5
              Field6
         I am going to receiver multiple Recordsets from my input and need to pass them as output flat file after doing some manipulations in mapping(I am using Java mapping).
         In Moni I am able to see multiple Recordset XMLs created but the message is failing in receiver communication channel with error
    "Failed to process message content. Reason: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)' (Software version: 3.0.1)"
         When I am trying to pass Single Recordset I am able to see the output, but when I am trying with multiple Recordsets it is throwing error.
         Can anybody help me in finding the root cause to this problem.
         My Receiver channel Content conversion is as follows.
         RecordsetStructure: Record1,Record2, -- - - ,Record9
              Record1.fieldFixedLengths     
              Record1.fieldNames
              Record1.endSeparator so on till Record9
    Regards,
    Jayaram.G

    You might want to check the following things
    Are u specifying field names,separators for Record1,Record2..Record9.
    Is you occurence repeats after record1..record9 again?
    Change your  structure occurence as per the runtime data you provide..
    See whether your java mapping modifies the structure that does not match with fcc configuration. You might want to pay attention over there too.

  • Multiple flat files with Comma delimiter and Pipe Delimiter in the sub folders.

    Hi,
    I have a directory C:\doc\Outcomes\Health  --(This is the main path). 
    In the path above i have multiple subfolders like 
    A
    B
    C
    D
    Folder A & B have 20 flat files each which are comma separated and pipe delimiter files. 
    Folder C&D have 20 excel files each.
    1) So, In SSIS while looping through the subfolders how do i limit to loop only excel files one time and flat files one time.
    2) In folder A&B, how do i loop only Pipe delimiter files (neglecting comma saperated files). I want to loop only pipe delimiter files while using for each loop container.
    Thanks 

    Both are txt files, but the data inside the files is saperated by ',' and '|'. ( comma and pipe)
    Thats ok 
    If delimiters are not consistent you can use this method
    http://visakhm.blogspot.in/2014/07/ssis-tips-handling-inconsistent-text.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to Map Idoc-Orders05 Qualifier permitted values to a flat file Str

    Hi All,
    My scenario is IDoc-xi-flat file. I have a problem in mapping the respective qualifier value in IDoc to the flat file structure. I am using the function fix values in Message Mapping. Suggest how should the target field should look like to map to the qualifier.
    Thanks
    Gowri K.

    hi,
    can you tell a little bit more on what are you trying to achive?
    do you only need one qualifier in file or all or what?
    can you use the same structure as in IDOC ?
    be a little more precise
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Flat File  mapping issue

    Hello All,
    I am trying to an extract using flat file method in BI 7.0. I have some 150 fields in my CSV file but i wanted is just about 10 which are scattered around in the CSV file.When i Read Preview Data in the Preview tab i see incorrect data in there.And that too all under one tab, basically all under one field , though in the extraction tab for  Data Seperator i have been using ; and also tried checking the HEX box, for escape i have the ", tried HEX for this aswell.For rows to ignore i have 1.
    One thing i would like to know is how will the BI infoobject know where is the position of the flat file field in the  CSV file and where will it be mapped.i know it can be mapped in the Transformations but that is from the flat file datasource, i am asking about the CSV file.
    Please help me out and tell me what am i doing incorrectly.
    Thanks for your help.Points will be assigned.

    hi,
    use ,and ; as the escape signs.
    system takes care of it when u speicfy the path and name of the file and format as CSV.
    always the system checks the one to one mapping of the falt file fields with the infoobject in the datasource.
    options for u
    1. arrange the neccessary fields in the flat file that exactly maps with infoobjects for mapping. then start loading.
    2. keep as such and load with scattered field and in transformation map the required fields alone.
    second option consumes more memory space unneccessarily.
    For BI 7.0 basic step to laod data from flat (excel files) files for this follow the beloww step-by step directions ....
    Uploading of master data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    1. Creation of Info Objects
    • In left panel select info object
    • Create info area
    • Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    • Create new characteristics and key figures under respective catalogs according to the project requirement
    • Create required info objects and Activate.
    2. Creation of Data Source
    • In the left panel select data sources
    • Create application component(AC)
    • Right click AC and create datasource
    • Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
    • In general tab give short, medium, and long description.
    • In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    • In proposal tab load example data and verify it.
    • In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    • Activate data source and read preview data under preview tab.
    • Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3. Creation of data targets
    • In left panel select info provider
    • Select created info area and right click to select Insert Characteristics as info provider
    • Select required info object ( Ex : Employee ID)
    • Under that info object select attributes
    • Right click on attributes and select create transformation.
    • In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    • Activate created transformation
    • Create Data transfer process (DTP) by right clicking the master data attributes
    • In extraction tab specify extraction mode ( full)
    • In update tab specify error handling ( request green)
    • Activate DTP and in execute tab click execute button to load data in data targets.
    4. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
    BW 7.0
    Uploading of Transaction data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    5. Creation of Info Objects
    • In left panel select info object
    • Create info area
    • Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    • Create new characteristics and key figures under respective catalogs according to the project requirement
    • Create required info objects and Activate.
    6. Creation of Data Source
    • In the left panel select data sources
    • Create application component(AC)
    • Right click AC and create datasource
    • Specify data source name, source system, and data type ( Transaction data )
    • In general tab give short, medium, and long description.
    • In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    • In proposal tab load example data and verify it.
    • In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    • Activate data source and read preview data under preview tab.
    • Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    7. Creation of data targets
    • In left panel select info provider
    • Select created info area and right click to create ODS( Data store object ) or Cube.
    • Specify name fro the ODS or cube and click create
    • From the template window select the required characteristics and key figures and drag and drop it into the DATA FIELD and KEY FIELDS
    • Click Activate.
    • Right click on ODS or Cube and select create transformation.
    • In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    • Activate created transformation
    • Create Data transfer process (DTP) by right clicking the master data attributes
    • In extraction tab specify extraction mode ( full)
    • In update tab specify error handling ( request green)
    • Activate DTP and in execute tab click execute button to load data in data targets.
    8. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. There are two tables in ODS new table and active table to load data from new table to active table you have to activate after selecting the loaded data . Alternatively monitor icon can be used
    Ramesh

  • How to map multiple output values to the output schema in biztalk mapper?

    Hi,
    In my biztalk mapper, I am using a "database lookup" functoid which is linked to a "Value Extractor" functoid. A source schema field is linked to the database lookup functoid which is linked to a "Value Extractor" functoid
    which is linked to the destination schema field. After passing the required parameter values in the database lookup functoid (lookup value, conn string, table, column name), I know that the result set may get multiple rows which are transferred to the "value
    extractor" functoid.
    Now what I want is to create a record in destination schema for each row in the result set. My current mapping is as below:
    1) Source record > looping functoid > destination record
    2) Source record field > Database functoid > Value Extractor functoid > dest record field
    but this mapping is giving me only the first value in result set.
    Please help me in this so that my map creates a destination record for each value in the result set.
    e.g. if query [select * from employees where surname='Brown'] returns five records, then I would like five records in the destination schema.
    Thanks
    manibest

    Hi Muhammad Ehsan,
    Thank you for the useful suggestion. however, I have only one difficulty in building your suggested solution. in my query  (select
    * from employees where surname='Brown'), the value of surname is coming from the source schema field which could be different in each source schema record field.
    lets say that source schema instance has 3 records in it as below:
    <Records>
    <Record><Surname>Brown<Surname></Record>
    <Record><Surname>Atkinson<Surname></Record>
    <Record><Surname>White<Surname></Record>
    </Records>
    For each of above records the database query should run with the relevant surname value. if database has 5 records for "Brown", 3 records for "Atkinson" and 1 record for "White" then the destination schema should create (5+3+1) = 9 records in
    total.
    To create a destination canonical schema that works fine, I have to somehow pass this surname value from source schema as parameter so that it uses this value to poll the database and get records. Is there a way I can pass this surname value as parameter
    to the destination canonical schema? Thank you so much for the help.
    manibest

  • Biztalk Map create duplicate target node

    Using biztalk mapper, I need a target node to be duplicated.. I have created a simplified version of my issue. Please see below map
    link for source and destination schema.
    I  need the target Option node to be duplicated for each OptionNotes. The value of OptionNotes is to be split by a pipe ("|"),
    then map to target Code and Description.
    The input is as below:
    <ns0:Source xmlns:ns0="http://Test.SOAP.Source1">
    <Option>
    <OptionID>ID0_NoNotes</OptionID>
    <OptionName>OptionName_0</OptionName>
    </Option>
    <Option>
    <OptionID>ID1_NoNotes</OptionID>
    <OptionName>OptionName_1</OptionName>
    <OptionNotes>NOTE1|BLAH1</OptionNotes>
    <OptionNotes>NOTE2|BLAH2</OptionNotes>
    </Option>
    </ns0:Source>
    The output should be as below:
    <Destination>
    <Options>
    <Option>
    <Code>ID0_NoNotes</Code>
    <Description>OptionName_0</Description>
    </Option>
    <Option>
    <Code>ID1_NoNotes</Code>
    <Description>OptionName_1</Description>
    </Option>
    <Option>
    <Code>NOTE1</Code>
    <Description>BLAH1</Description>
    </Option>
    <Option>
    <Code>NOTE2</Code>
    <Description>BLAH2</Description>
    </Option>
    </Options>
    </Destination>
    Tried to use Looping and combination with Value Mapping, but to no avail. Do I have to resort to inline xslt?
    Thanks.

    Thanks for all your answers.
    @Pi_xel_xar Your suggestion requires a change in the message schema.
    @Nadeem We have already tried the solution on the blog, but it's not quite the scenario we face. The issue is the OptionNote is in the same layer as OptionID and OptionName.
    We have used another tool, which has done this easily. We then get the XSLT and import it as part of Inline XSLT scripting functoid.
    The XSLT produced was as below:
    <xsl:for-each select="ns0:Source/Option">
    <Option>
    <xsl:for-each select="OptionID">
    <Code>
    <xsl:value-of select="string(.)"/>
    </Code>
    </xsl:for-each>
    <xsl:for-each select="OptionName">
    <Description>
    <xsl:value-of select="string(.)"/>
    </Description>
    </xsl:for-each>
    </Option>
    </xsl:for-each>
    <xsl:for-each select="ns0:Source/Option/OptionNotes">
    <xsl:variable name="var1_resultof_cast" select="string(.)"/>
    <Option>
    <Code>
    <xsl:value-of select="substring-before($var1_resultof_cast, '|')"/>
    </Code>
    <Description>
    <xsl:value-of select="substring-after($var1_resultof_cast, '|')"/>
    </Description>
    </Option>
    </xsl:for-each>
    Thanks everyone.

  • How to map an array to fixed fields using Biztalk mapper

    I need to remap an array of objects like this:
        <Root>
          <ListOfObjs>
            <Obj>
              <Attr1>0000</Attr1>
              <Attr2>Hello!</Attr2>
            </Obj>
            <Obj>
              <Attr1>1111</Attr1>
              <Attr2>Hello1!</Attr2>
            </Obj>
          </ListOfObjs>
        </Root>
    in an output like this:
            <Root>
                <Obj1_Attr1>0000</Obj1_Attr1>
                <Obj1_Attr2>Hello!</Obj1_Attr2>
                <Obj2_Attr1>1111</Obj2_Attr1>
                <Obj2_Attr2>Hello1!</Obj2_Attr2>
            </Root>
    So in my XSD schema I have something like this:
    Schema Input
                               <xs:element name="Root">
                                <xs:complexType>
                                 <xs:sequence>
                                  <xs:element name="ListOfObjs">
                                   <xs:complexType>
                                    <xs:sequence>
                                     <xs:element name="Obj">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
                                    </xs:sequence>
                                   </xs:complexType>
                                  </xs:element>
    Schema output
                                     <xs:element name="Root">
                                      <xs:complexType>
                                       <xs:sequence>
                                        <xs:element name="Obj1_Attr1">
                                         <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       <xs:element name="Obj1_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr1">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                        <xs:element name="Obj2_Attr2">
                                        <xs:simpleType>
                                          <xs:restriction base="xs:string">
                                           <xs:minLength value="1"/>
                                           <xs:maxLength value="50"/>
                                          </xs:restriction>
                                         </xs:simpleType>
                                        </xs:element>
                                       </xs:sequence>
                                      </xs:complexType>
                                     </xs:element>
    In addiction I have to evaluate every single value because when I found some conditions (like if value=0000 output should be NULL).
    What would be the best way to do it? I'm thinking to develop a custom functoid but I'm not sure it would be the best way, probably it could be done even using XSLT inline transforms, can you point me in the best direction?
    Thank you

    Hi,
    You cannot directly map an array output to any single field in BizTalk mapper.
    Couple of options :
    1) create
    the Xslt or inline C# code
    Refer: 
    http://seroter.wordpress.com/2008/10/07/splitting-delimited-values-in-biztalk-maps/
    2) Shankycheil has
    provided a solution to similar requirement in the below link, u can also refer that.
    https://social.msdn.microsoft.com/Forums/en-US/55ec472d-4f34-4057-b1c6-0e50740f0f6e/how-to-itterate-string-array-values-in-biztalk-mapper?forum=biztalkgeneral
    Rachit
    Thank you, I already seen both posts, but I'm not sure they are what I need or I can't understand well how to use them.
    Speaking about the first solution, as I told before, in the example I should have an array already formed and delimited by a char (something like "obj1attr1-obj1attr2-ob2attr1-obj2attr2". In this situation probably this example could be a good
    point to start from, but how to transform my complex input object in a similar formatted string?
    About the second I don't understand well what is the working solution that they have adopted. Is the 4 steps solution suggested by  Shankycheil? If yes, how can I loop between all array elements and extract all their values?

  • Maps: How to generate a single node from multiple nodes

    Hi,
    I have a problem while mapping. I have a large complex input schema through which I generate a flat file output. I have used map for creating the output. Below is the
    output and expected output.
    Output:
    E,651,120,3999,2013-12-01,2013-12-25,25,556,0.00,0
    E,652,120,3901,2013-12-01,2013-12-27,27,6176.25,0.00,0
    SR,17,120,2013-12-25,2022,122013,2,6732.25,1,01389399501
    SR,17,120,2013-12-27,2022,122013,2,6732.25,1,01389399501
    Expected Output:
    E,651,120,3999,2013-12-01,2013-12-25,25,556,0.00,0
    E,652,120,3901,2013-12-01,2013-12-27,27,6176.25,0.00,0
    SR,17,120,2013-12-27,2022,122013,2,6732.25,1,01389399501
    There should always be one SR node. The node which should be present should be the one which has maximum DATE. While mapping how can I check before hand that there will be more DATE values coming and then map only latest. It’s a complex mapping so I’m looking
    for a simple solution.
    I want some conditions like while generating output SR Node, if there will be various SCR nodes in output then select the node with maximum date value in insert that in output.
    Thanks.

    Thanks for the detailed response Aswin. It's very helpful. Please help in one more condition, sometimes there could be multiple SR with same Date. In that case SR is still repeating as all are equal so above maximun logic is creating n nodes. Eg:
    Output:
    E,651,120,3999,2013-12-01,2013-12-25,25,556,0.00,0
    E,652,120,3901,2013-12-01,2013-12-27,27,6176.25,0.00,0
    SR,218,504420120,2013-10-04,0451,102013,1,393.85,AD,501
    SR,218,504420120,2013-10-04,0451,102013,1,393.85,AD,501
    Expected Op:
    E,651,120,3999,2013-12-01,2013-12-25,25,556,0.00,0
    E,652,120,3901,2013-12-01,2013-12-27,27,6176.25,0.00,0
    SR,218,504420120,2013-10-04,0451,102013,1,393.85,AD,501
    So, if there are maximum in that cas select max, which is working now and if they are same then any one of those.

  • CDATA element mapping in Biztalk Mapper

    Hi,
    we have a input message which has an element called ParticleName.
    an example is:
     <ns:ParticleName><![CDATA[TestingName]]></ns:ParticleName>
    There is a biztalk map which takes this message and transforms it into another.
    When i try test map, it doesn't output any value on the target ParticleName node.
      it comes as <ns:ParticleName>
                           </ns:ParticleName>
    There are 2 cases:
    a)In one case, I want only the node value (TestingName) in the target node?
    b)In the second case, i want the whole CDATA section in the target?
    Please assist.
    regards,

    Hi,
    If you want to read the values from the CDATA use custom XSLT functoid. Visit below links for your reference :
    http://stackoverflow.com/questions/10323332/how-to-parse-an-xml-dom-inside-a-cdata-element-in-xslt
    http://social.msdn.microsoft.com/Forums/en-US/a6f40a1f-583d-4339-8cf9-d70dd56b20df/cdata
    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question
    Regards,
    Rahul Madaan
    biztalkvillage.blopspot.com

  • Can't draw connection from anything to destination schema in BizTalk Mapper

    I'm new to BizTalk, so forgive me if I'm not using the correct terminology.  Anyways, I've created a composite Schema with two tables that I'd like to insert into, it's basically like this:
    <xs:element name="StorageLocationImport">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="mxstoreloc:Insert" /> 
                <xs:element ref="mxin:Insert" /> 
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    In the mapper, I'm able to map anything to `mxstoreloc:Insert` with no issue.  When I try to map **anything** to `mxin:Insert`, the connection doesn't work.  I drag the line, I get the crosshairs cursor (I've seen people before get the crossed-out-circle
    cursor, mine doesn't switch to that) and then when I let go the line disappears instead of connecting.
    I went into the schema and created a second `mxin:Insert` node, so it looked like this:
    <xs:sequence>
    <xs:element ref="mxstoreloc:Insert" />
    <xs:element ref="mxin:Insert" />
    <xs:element ref="mxin:Insert" />
    </xs:sequence>
    And for some reason that allowed me to make the connection (to either element), but if I deleted either of the two, the connections would disappear.

    I was able to figure out the solution.  The issue [mostly] lies within the map itself, not either of the schemas or connections.
    In the `Grid Properties` window, by default, `Ignore Namespaces for Links` is set to `True`.  Since I have multiple elements which are named `Insert`(even though the namespaces are different), the XML Mapper gets confused.  To fix this, simply turn
    `Ignore Namespaces for Links` to `False`.

  • Mapping question - concat two nodes

    hi all,
    i need to map a node with many occurrencies to a node with only one ocurrency, and i need to concat all the values from the source node into the target node.
    example:
    <delivery> 1..unbounded      -->       <data> 0..1
    <delivery> "this is "
    <delivery> "an example"
    result
    <data> "this is an example"
    does anybody know how can i solve this qestion?
    thanks in advanced.
    regards, Fabian

    Hi,
    Go for UDF...
    pass the source data as queue input to the UDF(i.e array)..in that udf loop over the source input and do concat inside the loop and pass the final result to the target element...
    string target = "";
    for(int i =0 ;i<input.length;i++)
    target = target + input<i>;
    if there are multiple contexts in this then need to handle the same
    HTH
    Rajesh

Maybe you are looking for