on 02-11-2010 11:09 AM
Hi,
In message mapping, I have a set of values in an array in the UDF, On which after looping at I want to create multiple target node in the target xml. The target node should duplicate to numbers of times equals to number of values in Source Array.
Can I achieve this by returning one by one value inside loop on array? .. Will this logic create multiple target nodes..?
Thanks
Amol
Edited by: AMOL BHARTI on Feb 11, 2010 12:09 PM
Hi Amol,
YOu can directly assign the list of values to the target value if all the values are in the same context.
If they are in different contexts, then use removeContext function and assign to the target node.
Source ->target node
or
Source->removeContext->target node
Regards,
ravi Kanth talagana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks...suggested solution worked...
Closing this thread....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi AMOL,
If values are coming directly from the source fields then do as said by Ravi.But if not and you are writing UDF then target node can be duplicated as
for (int i=0;i<input.length;i++)
{
result.addValue(i);
}
(choose Execution type as ALL VALUES OF A CONTEXT).Also ensure that target node occurrence is 0..unbounded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amol,
>>Can I achieve this by returning one by one value inside loop on array? .. Will this logic create multiple target nodes..?
Yes provided the target field has occurrence 'n' where n >= number of time you want it ot be created
Also if there is a parent node to this target field then it also need to be handled
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.