VoiceGuide IVR Software Main Page
Jump to content

Script Question

Recommended Posts

Hi,

 

I was experienceing something and I wanted to have your confirmation that it may be the cause of my script trouble:

I was doing this basic test (following) , where GET_MAT_APR and GET_JOUR are two get number modules. When NOT putting "" to $RV[GET_JOUR] and $RV[GET_MAT_APR], the scripts does not work properly. It gets to the next module after a while. When putting "" everything seems to be OK. Do you confirm that NOT putting "" could have such effect on the script ?

 

thkx

 

 

---------------------------------------------------------------------

GetJour=right("$RV[GET_JOUR]",2) & left("$RV[GET_JOUR]",2)

 

if "$RV[GET_MAT_APR]"="1" then

GetHour="10"

end if

if "$RV[GET_MAT_APR]"="2" then

GetHour="14"

end if

 

 

 

Share this post


Link to post

The $RV is a placeholder that will get substituted by the value assigned to the $RV before the script is ran.

 

In the case of:

 

GetJour=right("$RV[GET_JOUR]",2) & left("$RV[GET_JOUR]",2)

 

you must put quotes around the $RVs

 

but in case of

 

if "$RV[GET_MAT_APR]"="1" then

 

it is not a must, but is strongly advised, as otherwise if you used:

 

if $RV[GET_MAT_APR]=1 then

 

and nothing was entered in the GET_MAT_APR module then the VBScript would become:

 

if =1 then

 

which is a syntax error.

 

 

 

 

 

 

 

 

 

 

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
×