on 01-20-2009 6:47 AM
Hi,
Scenario : There is one source structure as beow :
<structure>
<Store_No/>
<Employee_No/>
<First_Name/>
<Middle_Name/>
<Last_Name/>
</structure>
This is for a single record. If more records are there, the structure is duplicated/appended.
The target structure required is for repeating "structure" above (i.e. more than one source structure) :
<Header>
<Record_Type>1</Record_Type>
</Header>
<Employee_Data>
<Record_Type>2</Record_Type>
<First_Name/>
<Middle_Name/>
<Last_Name/>
</Employee_Data>
<Header>
<Record_Type>1</Record_Type>
</Header>
<Employee_Data>
<Record_Type>2</Record_Type>
<First_Name/>
<Middle_Name/>
<Last_Name/>
</Employee_Data>
For one source "structure" it works fine. But when there is more than one structure it does not work. Could you please tell me an UDF for the same to work. Awaiting your replies. Points will be awarded once I get the correct solution. Thanks in advance.
Regards,
Deb.
Hi,
Is this structure correct?
<Messages> 1..1
-
><Messages1> 1..1
-
><Root> 0..unbounded
-
><Header> 1..1
-
> <Record_Type> 0..1
-
><Employee_Data> 1..1
-
> <Record_Type> 0..1
-
> <First_Name> 1..1
-
> <Middle_Name> 1..1
-
> <Last_Name> 1..1
Then you can do the following mapping:
for the Root:
Employee_No --> removeContext --> sort:Numerical Ascending --> splitByValue:ValueChanged --> collapseContext --> Root
The assumption here is that there is a unique employee number per employee, the above logic is to eliminate duplicates that could happen
for both Record_Type use constants
for the First Name:
Employee_No --> removeContext --> 1.sortByKey:Numerical Ascending -->
First_Name --> removeContext -
> 2. sortByKey:Numerical Ascending
splitByValue:ValueChanged --> collapseContext --> splitByValue:Each Value --> First_Name
This logic is almost the same as the root, it takes into consideration duplicate entries
for Middle_Name and Last_Name just replace the logic in First_Name
This should work
Regards
Edited by: dspboys on Jan 20, 2009 9:24 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Change the occurence to 0-unbounded for multiple set of records with same structure.
Regards,
Prakasu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.