on 2006 Jul 31 8:52 AM
Hi All,
I have a secnario like this:
Source Message
-
<address>
<line1>Line 1</line1>
<line2>Line 2</line2>
<line3>Line 3</line3>
</address>
-
Target Message
-
<address>Line1, Line2, Line3</address>
-
I want a mapping like as follows:
<address> --->concatenateAddresses ---> <address>
How can I access the individual lines from the source <address> element and concatenate them and pass to the target <address> element?
Is this possible?
Many Thanks,
Sandeep
Hi Michal,
Thanks for the quick response. But my requirement is slightly different. I cannot predict the number of times the line element occur. Actually the occurence of the <line> element is 0...unbounded. I made a mistake in the example i gave. it should be
<address>
<line>Joseph</line>
<line>St.Lawrence</line>
<line>Quebec</line>
...
<address>
In the above example the <line> element occurs multiple times and i want to concatenate all of them before mapping to the target <address>
Sorry for the confusion caused.
Thanks,
Sandeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
sure you can do it
you need to create a user advanced fuction (with check <b>Context or Queue</b>)
and inside this funciton you'll get the <b>line </b>
as array (table)
all you need is to loop at that array and
during the loop concat all values
and then
result.addValue(yourfinallongstring);
Regards,
michal
Hi Sandeep Joseph,
I got same problem. Now i am going to write udf for this ,
Please send me java code which you have for this problem.
this is urgent. i will wait for this
Thanks and regards
sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<line1> concatenate <some field>---
<line2>
<line3> -
Concatenate----Target.
Just concatenate the line1 and line2 and then put the result into a field and then concatenate line3 to the outputfield.
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in this case you just need to create a user function
that will take all 3 values (inbound)
and contatenate them
return a + b + c;
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.