cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional mapping in Graphical mapping

Former Member
0 Kudos

Hi All,

I have a conditional mapping requirement in the graphical mapping.that i have a two nodes in source side both are identical. Each node has corresponding sub elements. Target side i have node with subelements.Based on the below conditions I need to map corespnding source node to the target.

Condition1: IF LINE items node value is 'contracts.LineItem' in the source structure then map corresponsing target Line item node and its line item fields.

Condition2: If Line item node value is not 'contracts.LineItem' and if CATALOG_ID field is not populated and IF "/MT_FCI_CONTRACT_EXPORT/fcidataexport/objects/object/extensions/collection/@name" node value is 'MATGRP_COLLN' then only map corresponding source node 'ROW' to the target Line Item node and its fields.

I have achieved condition1, by having duplicating target Line Item node and mapping first condition source node. Please help me how to achive mapping in the secod condition.

Thanks in advance.

Regards,

Rajesh

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

+Condition2: If Line item node value is not 'contracts.LineItem' and if CATALOG_ID field is not populated and +

+IF "/MT_FCI_CONTRACT_EXPORT/fcidataexport/objects/object/extensions/collection/@name" node value is 'MATGRP_COLLN' +

then only map corresponding source node 'ROW' to the target Line Item node and its fields.

LineItem ---->
                                                 ------> equalS---> Not -->
Constant(contracts.LineItem)-->
                                                                                --------->And1(o/p from Not)
CATALOG_ID---->
                                 ------> equalS---> Not -->
Constant(keep blank)-->
                                                                                ---------->And2(o/p from And1 and equalS)--->IfWithoutElse->Target              
@name--->                                                                                (Then-->ROW)
                                             --->equalS--->
Constant(MATGRP_COLLN)--->

You will need to take care of Context of the source nodes, since you will be having multiple occurences of them.

Regards,

Abhishek.

Former Member
0 Kudos

Thank you All for ur inputs.

My requirement acheived as per Abhishek's inputs and addtional context changes to the source fields.

Thanks again.

Regards,

Rajesh

Answers (2)

Answers (2)

Former Member
0 Kudos

Rajesh,

It seems you can achieve your functionality using standrd if else functions. To get the exact mapping can you give us the source and target structures and an example payload, which would be more easy to understnad and also sombody can help you out by looking at them.

Regards,

---Satish

Former Member
0 Kudos

Hi Rajesh,

This is can be very easily achieved using UDF. Pass the node value / field value in the UDF as argument and do a check there.

If the UDF returns a true, then use the createIf function to map.

Hope this helps. Let us know if you have more questions.

Regards,

Neetesh