cancel
Showing results for 
Search instead for 
Did you mean: 

element value into UDF

Former Member
0 Kudos

Hello Friends,

I have a element in the Soruce side and I would like to get the value which is in the element into the udf and wants to concatenate(add) to a string . and result want to place it in target element.how to do this ...

Please provide the code ,if possible and (what I needs to take paramters for this and whether cache to take or context to take in this case)

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

U mean u want to make some changes in src element also.

wat is ur actual requirement?

Former Member
0 Kudos

Hi,

Alternate way


src------------->
                   textfunction(Concat)---->tgt
constant------>

Former Member
0 Kudos

hi,

you can use predefined functions CONCAT to obtain u r functionality. no need to use UDF for this.

Thanks,

Madhav

Note:points if useful

Former Member
0 Kudos

Hello Madhav,

I know this buddy..Bu I need to time and need to add some more....So thats why I need it thru UDF

Former Member
0 Kudos

Hi,

use cache parameter - value

public String concat(String a,Container container)
{
   //write your code here
 String value = "";//inser the string which u want to add to element
 String target = " ";
 target = a + value;
 return target;
}

source->udf(concat)->tgt

Edited by: malini balasubramaniam on Aug 20, 2008 3:43 PM

Former Member
0 Kudos

Hello Malini,

Thank you for your reply...

But I cannt hard code the source element,

I have only element and this will be populated at runtime and the value of the element needs to be sent to udf while using mapping