VoiceGuide IVR Software Main Page
Jump to content

Script Help

Recommended Posts

I have a simple task but can not get it to work. I have a user enter a time i.e. 1130, then i have them enter a "1" for AM or "2" for PM. I am trying rake the value from the Capture Enterend Module and if they entered a "2" add 12 to the number and pass it to a Say Numbers so I can have them verify their entry 1130 PM or if the enter a 1 - just pass the value ant wil will say 1130 AM

 

Jeff

Share this post


Link to post

Please post your current script and an excerpt from vgEngine trace capturing the call.

Share this post


Link to post

attached. The script is a subset of the larger working script. It is this portion that I can not get to work.

 

what i need is the ability to accept input and if less than 12, the add 12 to the number.

jwtest1.vgs

0803_ktTel.zip

Share this post


Link to post

Please see attached script.

 

The module [ArrivalTime] can also be removed if the TTS text is saved to a .txt file and that .txt file is played from the [GetArrival] module.

add1200.vgs

Share this post


Link to post

Thanks! works great - one issue maybe you can help with. If they enter three digits, how can I prepend a zero "0" to the RV

 

Jeff

Share this post


Link to post

You would need to use either a VBScript or two Evaluate expression modules to do this.

 

In a VBScript module something like the below would be used:

 

if len("$RV[timein]") = 3 then

sDay = "0" & "$RV[timein]"

else

sDay = "$RV[timein]"

end if

 

set vg = CreateObject("vgServices.CommandLink")

vg.Run_ResultReturn $RV_LINEID, "[time4digits]{" + sDay + "}"

set vg = Nothing

 

 

If using two evaluate expression modules the fist module would have this expression:

 

len("$RV[timein]")

 

then you would have a path like this:

 

on {3} goto [addo0tofront]

 

and addo0tofront would be another Evaluate Expression module which does this:

 

"0" + "$RV[timein]"

 

and saves the result to new RV, eg: time4digits

 

 

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
×