on 07-30-2009 1:43 PM
Hello,
I have the following problem in message mapping:
I have one target element and several values of a source structure which I collect using an If / then function. Afterwards I remove all contexts.
What I want to do now is to concat the remaining values to be filled to a single target element.
For example there are three values left in the queue (without a context change in between) and I would like to have all of them in a single field (separated by a blank).
Using the concat function it does not work of course as the exact number of elements is determined during runtime.
Is it possible to do this with standard functions or do I need to apply an advanced UDF?
Thanks for your advice.
Hi,
Here is the UDF code for the same..
While creating Advance UDF you have to select Cache as Context.
String output = "" ;
for( int i = 0; i< a.length; i++ )
{
output = output + a<i>;
if ( i != a.length - 1 )
{
output = output + " " ;
}
}
result.addValue(output);
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
According to your requirement source side number of values is not static, it will change in runtime. So better to go with UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think need to apply an UDF
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.