Skip to Content
0
Former Member
Jul 09, 2014 at 05:07 PM

Mapping Doubt

20 Views

Hi Experts,

My requirement is I will get queue of values for two source fields (Var1, Var2), when ever both are equal those many times third source field should send to target.

Attached is the image of my mapping (which is i am getting (wrong))

I tried below UDF's with execution type "All values of queue" , Please check and correct the UDF based on my below expected mapping.

UDF1: (Not working as expected)

int len = var1.length;
int key =0;
String[] finalval = new String[len];

while(key<len)
{

for(int i=0;i<var2.length;i++)
{
if(var1[key].equals(var2[i]))
result.addValue(var3[i]);
}
key++;
}

UDF2: (Not expected as expecting)

int a=var1.length;

int b= var2.length;

for(int i=0;i<a;i++)

{

for(int j=0;j<b;j++)

{

if(var2[j].equals(var1i )) ("i" is under square brackets)

{

result.addValue(var3[j]);

}

}

}

Attached is the image of my mapping (which is i am expecting (If i pass same values two times i am getting this, But expected source values are different))

Thanks & Regards,

A.Neelima.

Attachments

Map.PNG (46.2 kB)
Map2.PNG (41.1 kB)