BizTalk Gurus

not so simple mapping question

rated by 0 users
Not Answered This post has 0 verified answers | 4 Replies | 2 Followers

Top 150 Contributor
10 Posts
Frank Castle posted on Mon, Jan 11 2010 1:43 PM

sorry, I thought I was logged in earlier, but I am a member....

I am attempting to take an X12 850 schema and I want to map a node's data elements to a record in a multi record 'flatfile'. 

basically I am mapping to a schema file that looks like the following

Node 1

         PO Number tag

         PO Number

Node 2

         N1 name tag

         N1 name

Node 3

         N2 addtnl name tag

         N2 addtnl name

basically, the first element of each node is just a hard coded value and the second element is the actual value as shown next

PO Number ,01133334

Cust Name,                           <---- no data exists, this is ok... blank field

Cust Address,111 N.Maple Dr

the second element comes from the source element.  but if the source NODE doesnt exist at all because no data was sent in it, then I simply want to kick out the tag (and empty element) in the target node.  I can force this to happen, but only when the source and target elements are NOT connected in the map!  I have tried this 6 ways to sunday and still cannot seem to make it work...  any help would be appreciated.  thank you

FC

All Replies

Top 10 Contributor
874 Posts

How do you specify the hard coded value in the first element?

 

replied on Tue, Jan 12 2010 7:13 AM

I specify it in the schema elements properties page in the VALUE field.

replied on Tue, Jan 12 2010 9:41 AM

Not sure if this screenshot is going to work, but it shows the EDI source schema and my target schema.  The '=' functoid set to 1 =1 on each of the target nodes on want to always output regardless...  then there is a link coming from the source element in the PER segment to the target element in Root_Child15 node.  this simple logic does not work.  It appears that the link from the source element overrides any logic on the target side.  Since the PER segment in the message does not exist, it is not considered in the code created for the target side.  This is even after I try to FORCE the node to kick with the always true parm...  does anyone have any idea for a work around on this? 

replied on Tue, Jan 12 2010 10:11 AM

OK well, I am too damn stubborn for my own good and thinking that I know there has to be a proper way of controlling this considering we have so much control over schema properties and such, I simply didnt want to give up on this... However...

I ended up just duplicating the node(s) on the target side and depending on the type of order would tell me which node set to activate.  one set connected to the sometimes there sometimes not PER segment, the other one forced to output if it is simply a regular order (Order Type=ST).

This seems to be working, but I would still be curious if there is another reasonable answer to my query.  I am not as proficient with properties and/or the creative ways to use functoids as some of you...  would be nice to know.  I even when into the .btm code to see if there was something there I could manipulate but it was not obvious there either.

l8r, FC

Page 1 of 1 (5 items) | RSS