on 07-21-2009 6:58 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.