on 09-23-2016 9:45 PM
Hi,
How calculate values from two different queues?
I would like to multiply values from two arrays.
below are my queues.
My values for target queue will be like below
output:
75* 3139.00 = 2354.25
25*3139.00 = 78475
0
0
Below udf is not working based on contextchangenode.
String Res="";
for ( int i=0; i<var1.length;i++ )
{
for ( int j=0; j<var2.length; j++ )
{
Res = var1[i] * var2[j];
result.addValue(Res);
}
}
Thanks
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Thank you very much, I am very glad because your answers are straight to the point.
I have a small doubt, If the first queue has null values then How will it behave?
Thanks
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
As I suggested, we can achieve it by using existing mapping function multiply.
Please find the below example which I captured in the screenshots.
1. both the field has same context.
2. Both have different context.
If you really face issue in context handling and unable to achieve your requirement by using standard mapping then go for UDF.
Hope this will be helpful.
Thanks
Sagarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
can you provide structure ?
And Also let us know , if corresponding value is not available in any of the context then what will be output expected. 0(Zero)?
Regards,
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Whether the two context is from 2 different field if yes then you can use existing mapping function to handle it.
Please give some more details on the requirements.
Thanks
Sagarika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
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.