on 08-25-2014 8:27 PM
Hi
I wrote the following udf to get the out out from notes .If each line item there are 5 notes and if any of them contains text example Test it should create only one target node Notes. I have data with first line item has one note with Test and remaining line 3 line items doesnot have that data in any of the notes .But it is creating the target notes in each line item .
boolean find = false;
for(int j = 0; j<edp01.length;j++)
{
for(int i = 0; i < ekpo2.length; i++)
{
if (var1[i].equals("Test")||
var2[i].equals("Test")||
var3[i].equals("Test")||
{
result.addValue("Y");
find = true;
break;
}
}
if (!find)
result.addValue("N");
}
z1ekpo2>mapwithdefault>removecontext>
zzmltnote1>mapwithdefault>removecontext>
zzmltnote2>mapwithdefault>removecontext > UDF >EQUALS>Y >CREATEIF>nOTES
zzmltnote3>mapwithdefault>removecontext>
edpo1>
All context set to E1EDP01
Not sure context issue or something is not correct in udf
Thanks for your help
try as below - remove boolean
for(int j = 0; j<edp01.length;j++)
{
for(int i = 0; i < ekpo2.length; i++)
{
if (var1[i].equals("test") || var2[i].equals("test") || var3[i].equals("test")) {
result.addValue("Y");
}else{
result.addValue("N");
}
}
}
Regards
Ramg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.