cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mapping on complex to simple tree structure

Former Member
1,792

Hi experts

Please help on the following mapping requirement: input structure

Output:

The output invoice_detail is mapped to input3-dat-invoices-record-invoice. invoiceid is mapped to invoiceid. However, the input invoices node can have cardinality 1..3 and the record may not exist. The first available invoice value is mapped to invoice_detail. If there is no invoice node available, no mapping should happen.

For example: input

output should be:

mt_output3

data

invoiceid x1

invoice_detail inv11

data

invoiceid x2

invoide_detail inv21

data

invoiceid x3

I would like to stay with graphical mapping. If I change it to XSLT, there are too many changes. Note that this is just a small portion of the real mapping.

Your help is much appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor

Hi jonathanma,

please try following mapping

record node's context should also be "data".

result

----

regards

Anupam

Answers (3)

Answers (3)

Former Member
Thank you, Anupam. That is a very smart solution. It works great. Thank you again.
anupam_ghosh2
Active Contributor
0 Likes

Great to know , solution worked for you. All the best. Keep smiling.

Regards

Anupam

Former Member
0 Likes

Anyone can help?

Former Member
0 Likes

The biggest issue is that data-invoices-record may not exist. That makes most of the node functions not working when I tried to align the invoice node against the data node. The invoice node tends to shift out of context position whenever we have blank record node.