|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
I need to concatenate something like repeating FTX segment from EDI to DB, as below:
EDI: FTX+HAN++Text1' FTX+HAN++Text2' FTX+HAN++Text3'
Each table in DB has (along with others) 3 rows in which I want to put Text1, Text2 and Text3 respectively.
I tried the string-join function but it produces flat output delimited by a character. What can I use to do what I am trying to do?
Thanks
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
Antonio92,
This does not sound like a string join.
If you want 3 rows for 3 FTX segments, just connect the FTX straight to the table.
|
|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
ultrabeet wrote:Antonio92,
This does not sound like a string join.
If you want 3 rows for 3 FTX segments, just connect the FTX straight to the table.
The FTX thing was an example. In fact, I am trying to do it with a three LOC segments.
I cannot directly connect the LOC segments to the DB because only the first segment show up in MapForce. It is 3 times repeated (no "maxOccurs" in config file) but I do not know how to select each one and map them to each row respectively.
Thank you
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
Antonio92,
As you are going for a quick and dirty solution, you can create 3 targets of the same table and connect each of them to your copies of LOC
|
|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
ultrabeet wrote:Antonio92,
As you are going for a quick and dirty solution, you can create 3 targets of the same table and connect each of them to your copies of LOC I think I did not explain well.
The solution you provide will create 3 different rows. The three copies of LOC must go to the SAME row in database. E.g. one copy means "port of origin", other one means "destination port" and other one is an additional port. Theese three things must be in the same row in the table.
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
Antonio92,
Then you need to create an intermediate structure eg. XSD or CSV between the EDI and the database.
Your 3xLOC will populate all elements of the intermediate object, whereas the row of the object itself will populate the database with 3 different columns, but will only create 1 row.
I hope it makes sense to you.
|
|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
ultrabeet wrote:Antonio92,
Then you need to create an intermediate structure eg. XSD or CSV between the EDI and the database.
Your 3xLOC will populate all elements of the intermediate object, whereas the row of the object itself will populate the database with 3 different columns, but will only create 1 row.
I hope it makes sense to you.
Could you explain how to do this? I can't figure it out.
Thank you
|
|
Rank: Advanced Member
Joined: 8/19/2012 Posts: 149 Location: Ireland
|
Sorry Antonio92,
I got confused there myself. This is an output behaviour, rather than input.
How do you manage to get multiple the LOC if the schema does not have maxOccurs for it?
I think your only option is to alter the message spec and then once you can loop on LOC, do something similar to the screenshot ultrabeet attached the following image(s):
|
|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
That was exactly what I was looking for. Thank you!
|
|
Rank: Member
Joined: 3/25/2014 Posts: 23 Location: Spain
|
One more question: How could I do the inverse?
I have the data for the three segments in database, and I want to generate three LOC segments in an output EDI. First one with one value, second one with the second one and the third with the third one.
|
|
Rank: Advanced Member
Joined: 6/16/2006 Posts: 487 Location: AT
|
Antonio92 wrote:One more question: How could I do the inverse?
Use "Duplicate Input".
|
|
guest |