on 09-28-2010 2:59 PM
Hi All.
I have to create a several files from one file according to the customer number
and I have to attach the right reference to the right customer positon number
let say I have the follwong file
<libarary>
<customer>
<pos>1</pos>
<nr>1</nr>
</customer>
<customer>
<pos>2</pos>
<nr>1</nr>
</customer>
<customer>
<pos>3</pos>
<nr>2</nr>
</customer>
<customer>
<pos>4</pos>
<nr>2</nr>
</customer>
<references>
<ref>1</ref>
<ref>2</ref>
<ref>3</ref>
<ref>4</ref>
</references>
</libarary>
according to the requirement I have to create 2 files , one for customer 1 and one for customer 2.
this is can be achieved by using split by value function to create 2 or more files , but my the challenge is how can I attache the ref field to the right pos field.
which means ref 1 and ref 2 should go to the file with pos 1 and pos 2 and ref 3 and ref 4 should go to the file with pos 3 and pos 4
the finale result should be like this
File 1
<File>
<customer>
<pos>1</pos>
<nr>1</nr>
</customer>
<customer>
<pos>2</pos>
<nr>1</nr>
</customer>
<references>
<ref>1</ref>
<ref>2</ref>
</references>
</File>
File 2
<File>
<customer>
<pos>3</pos>
<nr>2</nr>
</customer>
<customer>
<pos>4</pos>
<nr>2</nr>
</customer>
<references>
<ref>3</ref>
<ref>4</ref>
</references>
</File>
Any help will be higly apreciated
Thank you.
You have make sure all the levels properly mapped:
libarary/customer/nr -> removeConext() ->splitByvalue[ValueChange] -> CollapsContext() -> File
libarary/customer/nr -> removeConext() ->splitByvalue[ValueChange] -> customer
libarary/customer/nr -> removeConext() ->splitByvalue[ValueChange] -> CollapsContext() -> SplitByvalue[each value] -> File/customer/references
reference/ref----
>
FormatByExample() -> ref
libarary/customer/nr -> removeConext ->splitByvalue[ValueChange]-->
libarary/customer/nr -> File/customer/nr
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Liang and Luis
Problem solved with your help . thanks a lot
I had thoug to change the
libarary/customer/nr -> removeConext() ->splitByvalueValueChange -> CollapsContext() -> SplitByvalueeach value -> File/customer/references
to
libarary/customer/nr -> removeConext() ->splitByvalueValueChange -> File/customer/references
Cheers and keep on the good work.
Hi.Merhej
Try this
Reference\ref -
>
-
> formatByExample -
>Target.
Customer\r1-->removeContext -
>SplitByValue (ValueChange)>
Luis Ortiz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.