cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping issue, repeated lines are not populating

Former Member
0 Kudos

Hello All,

i have mapping where i need to map source node and its coresponding subelements to target node and its subelemtns based on certains condition, which i did using If condition.

Now my issue is, when mapped source node with condition , conditional field is not in the same node which i am mapping. It is in the parent node of the node which i am mapping. SO when i mapped to target node, only one occurence only its populating in target side even When lines repeated more than once its not populating all lines corespondingly. Please let me know how to populate all line items when i have validation field in parent node and child node and its subelemnts to be mapped to the target node. ( Both parent node and sub node in source and target node are unbounded) .

Thanks in advance.

Regards,

Kalpana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Kalpana

I guess the problem could be is the context , or maybe use useoneasmany to repeat values.

Can you give us the payload source and posible target.

Former Member
0 Kudos

Thanks for your reply, My source structre looks like below.

I have to map rows node and its coresponding fields to target node Lines which is unbounded and to its subelements when collection name = 'MATGRP_COLLN'. I did it using if condition but , only one row tis getting populated in target LIne node. next repeated row values are not populating in target side.

- <extensions>

+ <collection name="REGION_COLLN" />

+ <collection name="DIVISION_COLLN" />

+ <collection name="DTL_PRCNG_COLLN" />

+ <collection name="COUNTRY_COLLN">

- <collection name="MATGRP_COLLN">

- <row>

- <fields>

<OBJECTID>-2147483540</OBJECTID>

<UNIQUE_DOC_NAME>-21474835401248121690973</UNIQUE_DOC_NAME>

<DISPLAY_NAME />

<MATGRP_ITEM_NO>1</MATGRP_ITEM_NO>

<MATGRP_NAME>10100000</MATGRP_NAME>

</fields>

</row>

- <row>

- <fields>

<OBJECTID>-2147483539</OBJECTID>

<UNIQUE_DOC_NAME>-21474835391248121706160</UNIQUE_DOC_NAME>

<DISPLAY_NAME />

<MATGRP_ITEM_NO>2</MATGRP_ITEM_NO>

<MATGRP_NAME>10101500</MATGRP_NAME>

</fields>

</row>

</collection>

</extensions>

</object>

</objects>

</fcidataexport>

Former Member
0 Kudos

Hi

Please change the context. --Row.. an map to target. . ( if posible to send us the payload target)

Lines >> Ifwithoutelse >> equals >> 'MATGRP_COLLN'. collection name.

Former Member
0 Kudos

Hi ,

I tried by changing context for row field mapping , but still i am unable to populate all line items in target side. Below is the strucutre in target lines node.

- <lines>

<Number_Ext>1</Number_Ext>

<description>aaa</description>

<category_id>10100000</category_id>

<price>10.00</price>

<price_unit>1</price_unit>

<Quantity>10</Quantity>

<Quantity_Unit>EA</Quantity_Unit>

<supplier_part_no>aaa-aaa</supplier_part_no>

+ <Quantity_Ranges>

Thanks,

Kalpana

Former Member
0 Kudos

Hi Kalpana

Please map like this.

(source) Name >> EqualS (constant - MATGRP_COLLN) >> [1]

UseOneasMany ([1], Row, Row) >> RemoveContext >> [2]

ifWithoutelse >> [2] and Row (Change Context Parent) >> Lines (target)

Regards.

Edited by: Luis Ortiz on Jul 21, 2009 3:41 PM

Former Member
0 Kudos

Hi Lois, Thanks for ur reply.

Can you please be more clear?

what fields are the source aurgumetns for UseOneasMany function?

UseOneasMany ([1], Row, Row) >> RemoveContext >> [2] ?

in if condition what is field to be passed in If ?

ifWithoutelse >> [2] and Row (Change Context Parent) >> Lines (target)?

Thanks,

Kalpana

Former Member
0 Kudos

Ok..

Please see the picture [ Collection|http://www.imagenonline.com/imagenes/156/a156009.gif]

Regards

Former Member
0 Kudos

Kalpana,

Do the following for the Lines node

First map source field Name (attribute field) and Constant with value MATGRP_COLLN to "equalsS" Function. Then map the output of equalsS to removeContexts function.

Now use the IfwithoutElse function. The output of removeContext will be for the if and then condition will have source element Row. Change the context of the Row to Extensions. Now map the output to Lines. This is working for me.

Regards,

Ravi

Former Member
0 Kudos

Thanks Louis,

Its resolved my mapping issue.

Regards,

Kalpana

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kalpana,

Can you give us an example payload and what you are getting and what you want as an output. So please give source message type, sample payload and target message type.

This type of issues most likely you may require to use useOneAsMany function or copyvalue function along with some node functions. If you can give what I have requested somebody can help you.

Regards,

---Satish