on 04-27-2010 1:45 AM
Hi SDNers.
I need to make a UDF for special case.
I made under UDF but it has a problem.
When I delete a element in test, I expect to be returned the "nulltext" value.
Let me know how to coding.
- source code -
public String One2One(String in1, Container container) throws StreamTransformationException{
if (in1==null) {
return "nulltext";
} else {
return in1;
}
}
Hi,
If u remove fields from the test tab, the field will have only SUPPRESS value in the queue.
So u have to check for suppress inside your UDF.
Or use "mapWithDefault" node function before ur UDF and check for ""(empty value) inside ur UDF.
Thanks,
Sona
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Are you using the below code in the UDF??
public String One2One(String in1, Container container) throws StreamTransformationException{
if (in1==null) {
return "nulltext";
} else {
return in1;
}
}
If so it wont work. UDF itself a function and not possible to use a function inside a fn,
Try the below code,
if (in1==null) {
return "nulltext";
} else {
return in1;
}
Also "When I delete a element in test," -- wat does it mean?
Regards
Ramg.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Ramg.
"When I delete a element in test," means,
After creating Message Mapping in ESR, we can see the "Test" tab.
Entering some values in source and getting the result.
When I enter some values in source, I delete some elements using right button of mouse.
and I wrote source code like you.
public String One2One(String in1, Container container) throws StreamTransformationException{
//*----
// this is real code
if (in1==null) {
return "nulltext";
} else {
return in1;
}
//*----
}
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.