cancel
Showing results for 
Search instead for 
Did you mean: 

UDF to multiply Item and Quatity

Former Member
0 Kudos

Hi,

I have a requirement where Item (i=1..n) need to get mutplied with Quantity(i=1..n) against it and find the summary of it.

Sum[i]=Item[i]*Quantity[i] we want the output to be like this.

Sum will get repeated.

Please help.

Accepted Solutions (0)

Answers (1)

Answers (1)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Shikha,

I don't know your source message structure but you could do a UDF with all values of a queue and code like this:


for(int i = 0; i < Item.length; i ++)

result.addValue(Item[i] * Quantity[i]);

The assumption here is that both Quantity & Item queues will be filled with the same number of values.

Regards,

Ryan Crosby