Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: PFCCWA on December 03, 2014, 04:57:09 PM
-
Hello,
Thought this was easy and correct but when using this formula in function block in IRD routing strategy, output values are not what is expected:
variable_1 value is taken from AverageWaitTime (integer)
variable_2 is taken from CurrectWaitTime (integer)
variable_Pct = (Variable_1 / Variable_2 ) * 100
If variable 1 is less than variable 2, urs logs show variable_pct as 0 ie ie 38 / 69 * 100 should equal 55 but is 0.
If variable 1 is greater than variable 2, urs logs show a value but is incorrect ie 124 / 98 * 100 should equal 126 but is 100.
Where is this going wrong.
thanks,
-
If both variables a and b are INTEGER IRD will male "integer division" for a/b (exactly what you get in C/C++ -
in case of int a = 1; int b = 2; int z= a/b; ).
If you need fraction use FLOAT variables or change order Variable_1 *100 / Variable_2
-
thanks , changing the formula around has worked.