VoiceGuide IVR Software Main Page
Jump to content

Decimal Point

Recommended Posts

Hi

 

I didn't understand how to use the "Captured entered number" to catch a number with decimal point (lets supose 123.456)

How a user using his phone can enter the decimal point? and how should I later know that.

 

Danny.

Share this post


Link to post

If asking caller to enter a dollar amount you would usually ask caller to enter the number in cents, ignoring the decimal point. ie: $185.50 would be entered as 18550 and $77 would be entered as 7700.

 

If you know how many numbers after the decimal point ought to be entered then thats still the best approach - just tell caller to "enter the number including X places after the decimal point.."

 

if a variable number of digits after the decimal point should be allowed to be entered then it's best to use two separate "Get Number" modules and ask caller to "press * for a decimal point", then have an "On {*} ..." path going to the second Get Numbers module.

 

If you want the complete number to be accessible as one Result Variable yo can use and Evaluate Expression module to create the complete decimal number by concatenating the digits entered in the first and second modules (with a decimal point in the middle).

Share this post


Link to post
If you want the complete number to be accessible as one Result Variable yo can use and Evaluate Expression module to create the complete decimal number by concatenating the digits entered in the first and second modules (with a decimal point in the middle).

 

What expression would you use to combine the two modules? FormatNumber?

 

Tim

Share this post


Link to post

In an Evaluate Expression module you would use an expression like this to concatenate two RVs and put a decimal point in between:

 

$RV[OurFirstValue] + "." + $RV[OurSecondValue]

 

If you want to insert a decimal point into a number you would probably want to look at using VBScript and then have a look at these function: Left(), Right(), Mid(), Len()

Share this post


Link to post

You don't have to use two get-number modules to get a decimal point:

 

If you don't use the star button for any other purpose (and don't have it in the paths) then it will be embedded in the digits-string returned by the module.

 

ie: 77*00

 

One technique I use is to have the say-number functions modified to say "point" when it sees the "star". Its also easy to get the say-numbers functions to say sevety-seven dollars and zero cents, etc.

 

In VBS you can easily string-replace the star with a point as previsously mentioned.

 

Using one module is slightly more efficient and avoids possible timing issues.

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
×