on 12-24-2008 2:37 PM
Hi all,
find my UDF.
if( !(inValue[0].equals("") || inValue[0].equals("O") || inValue[0].equals("0") )) {
result.addValue(inValue[0]);
}else{
result.addValue(" ");
}
My requirement is if the input is 0 or O or "" then these records must be filtered at XI level.
the problem is even if the inputvalue is O or 0 or "" it is sent to receiver.
Thanks,
Srinivasa
Hi Srinivasa,
I understand you are using Adavanced UDF.
1. Change the counter to the "Loop Counter". Now, it is set to 0!
2 .For checking "", add trim
3. Don't send space in else
The updated UDF us below
if( !(inValue[ <CounterVariable> ].trim().equals("") || inValue[ <CounterVariable> ].equals("O") || inValue[ <CounterVariable> ].equals("0") ))
{
result.addValue(inValue[ <CounterVariable> ]);
}
Regards,
Swapna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As per me you can not just supress the complete reciord by putting an If at one element.You need to use this UDF at each and every element of the source record. You need to take care of the context changes in this process. Provding your source and targets would be helpful to understand it better.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by filtered? The udf you have shown just pass the value as it is and in the else part it passes a space. You may use "createIf" function and then use the condition.
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.