VoiceGuide IVR Software Main Page
Jump to content

Evaluate Expression Problem

Recommended Posts

Please explain why the following behaviour

 

21132 0 tapie monitordigits 49 2

21132 0 LsGetNbrsRxDigits [1]

21132 0 [D1_USDollars] Number Input 1

21984 0 tapie monitordigits 48 2

21994 0 LsGetNbrsRxDigits [0]

21994 0 [D1_USDollars] Number Input 10

22765 0 tapie monitordigits 48 2

22775 0 LsGetNbrsRxDigits [0]

22775 0 [D1_USDollars] Number Input 100

23606 0 tapie monitordigits 48 2

23616 0 LsGetNbrsRxDigits [0]

23616 0 [D1_USDollars] Number Input 1000

24527 0 tapie monitordigits 48 2

24527 0 LsGetNbrsRxDigits [0]

24527 0 [D1_USDollars] Number Input 10000

25308 0 tapie monitordigits 35 2

25308 0 LsGetNbrsRxDigits [#]

25318 0 [D1_USD_DPT] Evaluate [$RV[D1_USDollars] / 100]

25318 0 RVreplace start: [$RV[D1_USDollars] / 100]

25318 0 RVreplace end: [10000 / 100]

25318 0 .Eval(10000 / 100)

25318 0 Eval Expr result:[100] => [D1_USDollars]

25328 0 [D1_ComputeUSD-Pesos] Evaluate [10.25 * $RV[D1_USDollars]]

25328 0 RVreplace start: [10.25 * $RV[D1_USDollars]]

25328 0 RVreplace end: [10.25 * 10000]

25328 0 .Eval(10.25 * 10000)

 

As you can see from this log I enter 10000. This is meant to be 100.00 but since we have no way of entering a decimal point I use an expression module to divide this by 100. That express (as highlighed in red) seems to assign the value back to the D1_USDollars result variable. The next lines (highlighted in blue) do not show the correct value.

 

What am I doing wrong this time?

 

Scott

Share this post


Link to post

The problem seems to happen when the evaluate expression module attempts to replace and existing value.

 

I will also send you a VGL file with that should show the problem.

Share this post


Link to post

I have been advised this issue has been resolved in version 4.9.1 of VoiceGuide onwards.

 

As a workaround in the meantime (in current v4.9.0) the Result Variables with the same name are still correctly updated when the "Store Results in Log file" option is selected in the Evaluate Expression module. The following trace is from current v4.9.0:

 

67828 8 tapie monitordigits 49 2

67859 8 LsGetNbrsPlayWelcMsg [1]

67906 8 PlaySoundStop ok

67906 8 [D1_USDollars] Number Input 1

68187 8 tapie monitordigits 48 2

68187 8 LsGetNbrsRxDigits [0]

68187 8 [D1_USDollars] Number Input 10

68625 8 tapie monitordigits 48 2

68640 8 LsGetNbrsRxDigits [0]

68640 8 [D1_USDollars] Number Input 100

69031 8 tapie monitordigits 48 2

69031 8 LsGetNbrsRxDigits [0]

69031 8 [D1_USDollars] Number Input 1000

69468 8 tapie monitordigits 35 2

69468 8 LsGetNbrsRxDigits [#]

69468 8 [Eval] Evaluate [$RV[D1_USDollars] / 100]

69484 8 RVreplace start: [$RV[D1_USDollars] / 100]

69484 8 RVreplace end: [1000 / 100]

69484 8 .Eval(1000 / 100)

69484 8 Eval Expr result:[10] stored in $RV[D1_USDollars]

69484 8 [Eval2] Evaluate [10.25 * $RV[D1_USDollars]]

69484 8 RVreplace start: [10.25 * $RV[D1_USDollars]]

69484 8 RVreplace end: [10.25 * 10]

69484 8 .Eval(10.25 * 10)

69484 8 Eval Expr result:[102.5]

 

 

Here is a trace from upcoming v4.9.1 which shows the Result Variables being correctly updated regardless of whether "Store Results in Log file" option is selected.

 

32984 8 tapie monitordigits 49 2

33000 8 LsGetNbrsPlayWelcMsg [1]

33046 8 PlaySoundStop ok

33046 8 [D1_USDollars] Number Input 1

33234 8 tapie monitordigits 48 2

33234 8 LsGetNbrsRxDigits [0]

33250 8 [D1_USDollars] Number Input 10

33578 8 tapie monitordigits 48 2

33578 8 LsGetNbrsRxDigits [0]

33578 8 [D1_USDollars] Number Input 100

33843 8 tapie monitordigits 48 2

33843 8 LsGetNbrsRxDigits [0]

33859 8 [D1_USDollars] Number Input 1000

35078 8 tapie monitordigits 35 2

35078 8 LsGetNbrsRxDigits [#]

35078 8 [Eval] Evaluate [$RV[D1_USDollars] / 100]

35078 8 RVreplace start: [$RV[D1_USDollars] / 100]

35078 8 RVreplace end: [1000 / 100]

35078 8 .Eval(1000 / 100)

36890 8 Eval Expr result:[10] stored in $RV[D1_USDollars]

36890 8 [Eval2] Evaluate [10.25 * $RV[D1_USDollars]]

36890 8 RVreplace start: [10.25 * $RV[D1_USDollars]]

36906 8 RVreplace end: [10.25 * 10]

36906 8 .Eval(10.25 * 10)

36906 8 Eval Expr result:[102.5]

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×