none
Biztalk Mapping help (functoids) RRS feed

  • Question

  • I'm trying to use the Biztalk mapper to output some fields, concatenated into a single field.  The input is a positional flat file.  Below are simplified schemas for the input and output.  All the fields need to be mapped into a single field in the output...and somewhat "pretty" formatted.  The problem is that there can be multiple <customer> records in the input.  Additionally, the <c1> node can be repeated multiple times (in the example i've only put it twice).  Also, useful is that the <c1> fields' layout are the same.  

    Is there a way to do this using functoids/inline scripts?

    INPUT FILE SCHEMA:

    <root>
    	<customer>
    		<d1>
    			<text1a>
    			<text1b>
    		<d1>
    		<d2>
    			<text2a>
    			<text2b>
    		<d2>
    		<d3>
    			<text3a>
    			<text3b>
    		<d3>
    		<c1>
    			<text7a>
    			<text7b>
    		<c1>
    		<c1>
    			<text7a>
    			<text7b>
    		<c1>
    	<customer>
    <root>


    OUTPUT XML SCHEMA:

    <cust>
         <notes>
    <cust>


    Where the notes output field should look like (where the <textblah> would actually represent data...and the DXTextBlah:  is a text label):

    D1TextA: <text1a>
    D1TextB: <text1b>
    D2TextA: <text2a>
    D2TextB: <text2b>
    D3TextA: <text3a>
    D3TextB: <text3b>
    C1TextA           C1TextB
    <text7a>          <text7b>
    <text7a>          <text7b>


    • Edited by jklauß Tuesday, December 22, 2015 8:43 PM format
    Tuesday, December 22, 2015 8:42 PM

All replies

  • Just posted a response for a similar thread here 

    Biztalk Mapping issue

    see if that helps.


    • Edited by Sid Karnati Tuesday, December 22, 2015 9:06 PM
    Tuesday, December 22, 2015 9:06 PM
  • It's close but not entirely what I'm looking for.

    Right now I have a C# script to concat all the D# fields...

    ...I was hoping I could use the result of that as an input to a XSLT script...where I would then loop through and append the C# data.

    Does that make sense?

    Tuesday, December 22, 2015 9:27 PM
  • Can you be more specific on your output requirements? Is it supposed to be a flat file?

    You want the D# lines to be horizontally formatted but the C# lines should be vertically formatted?

    Tuesday, December 22, 2015 9:47 PM
  • The input file is Flat and looks like (it's positional flat):

    ----

    D1 Fname Lname

    D2 Addr1 Addr2

    D3 City State

    C1 Branch1 Salesman1

    C1 Branch2 Salesman2

    ----

    The output file is XML BUT all my data is going into a Notes field (which is just text).  

    The text based on the output above should look something like:

    ---

    Name: $Fname $Lname

    Address 1: $Addr1

    Address 2: $Addr2

    City, State:  $City, $State

    Branches:                  Salesman:

    $Branch1                   $Salesman1

    $Branch2                   $Salesman2

    ----

    (So, the bold is just text and the $ are the values of the fields.)

    I hope this helps.

    Tuesday, December 22, 2015 9:59 PM
  • It would be better if you post the sample input and output , as the above sample is not clear

    Regards, Aboorva Raja R Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, December 23, 2015 8:59 AM