on 08-02-2007 6:41 AM
I have the following requirement.
At the source side i have:
Employee 1..n Employee 1..n
Type 1..1 A
Name 1..1 abc
Id 1..1 123
If my Type is 'A' then i should get the following output else these fields should be blank
At the target side i have
Employee Employee
Details 1..n Details
Data abc
Details
123
Its something like the node 'Details' should repeat twice with the elements under it if the Type is 'A'.
I have tried using a UDF but 'Details' is repeating as a field and not as a node with 'Data' under it.
Hi,
I think it would be easier to do it this way.
Go to the mapping editor and right-click on the Details node, then select "Duplicate Subtree".
You should now have two Details nodes.
Then use an "if-without-else" statement to map the second Details node, where you condition would be "if Type equals A".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayalaxmi,
Can you post ur source structure and input file data here.In UDF, u should have two for 'for' loops and according to ur requirement u should change the logic.
reply back with source , target str and iput file data.
Regards,
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayalaxmi,
Assume you are creating the 'Data' elements from the UDF, if the employee type is 'A'.
While creating the 'Data' elements, try using the SplitByValue[Eachvalue] node function.This would create a separate Detail node for the 'Data' elements.
Thanks,
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.