VoiceGuide IVR Software Main Page
Jump to content

Rv_lineid In Variable Name

Recommended Posts

I'm trying to get the evaluate module to use "X-$RV_LINEID" as the stored variable name, to help prevent inaccurate variables for multi lines so i can just call [GenericName-$RV_LINEID] to get the right value. but it doesn't seem to be working. Is it possible to create dynamic variable names like that? If not, what methods do you suggest for getting the job done?

Share this post


Link to post

Yes it is possible.

 

Can you post a sample script of what it is you are trying to do?

 

Also please keep in mind that there was a bug in v5.0 which prevented nested RVs - but v5.1 fixed this problem. (Registration codes issued for v5.0 work with v5.1)

Share this post


Link to post

i'm using 5.1. Is it also possible to use dynamic variable names in other module names, or is it just limited to eval's assign feature? script below.

test.vgs

Share this post


Link to post

From VoiceGuide Help file:

 

Where can Result Variables be used

You can use them just about anywhere. eg:

 

Specifying the 'trigger' and the destination modules in Paths leaving a module,

Filenames of sound files which are to be played or recorded,

What digits/dates/amounts are to be spoken to the caller in the Say Number module,

Looking up information in a database,

As parameters when calling other programs,

Evaluate Expression modules,

Send Email module: in destination Email address, Title, Message Body and Attachment Filename.

Share this post


Link to post

yes i've seen that. but i meant can i NAME a module, say a db module "DBMODULE-$RV_LINEID", and anytime i called it, i would call it with "goto [DBMODULE-$RV_LINEID]", so you'd never have to worry about getting results mixed from line to line. also did you look at the attached script? what i'm trying to do isn't working.

Share this post


Link to post

In your script you should evaluate expression:

 

$RV[Login]-$RV_LINEID

 

Then store result in a new RV - lets call it NewValue - so you should specify just NewValue in the "Assign result to following Result Variable" text box.

 

You can then us the new RV by specifying $RV[NewValue]

 

I'd suggest reading more of the Help file's sections on Result Variables and the various modules...

 

can i NAME a module, say a db module "DBMODULE-$RV_LINEID", and anytime i called it, i would call it with "goto [DBMODULE-$RV_LINEID]"

Yes.

eg: For line number 5 the module would have to be called "DBMODULE-5" and then the path "goto [DBMODULE-$RV_LINEID]" would take you to that module....

 

But why are you trying to have separate Database Query modules depending on LineID? You say:

worry about getting results mixed from line to line

Do you want to access different databases depending on which line the call came in on? If you need that then just use the $RV_LINEID as part of the SQL query to specify different databases or tables...

Share this post


Link to post

ah, that was right in front of my eyes, sorry. I'm worried about getting results mixed up because i built most of the script in the mindset of just having one line, and there's tons of database work and places where multiple callers would end up getting each others variables if the timing was right, so i'm trying to save some face. Thank you for your help, I'm sure I'll need it again.

Share this post


Link to post
where multiple callers would end up getting each others variables

Result Variables are not global - they are valid only for the line in which they were defined - you cannot get Result Variables 'mixed up' across different lines...

Share this post


Link to post
In your script you should evaluate expression:

 

$RV[Login]-$RV_LINEID

 

Then store result in a new RV - lets call it NewValue - so you should specify just NewValue in the "Assign result to following Result Variable" text box.

 

You can then us the new RV by specifying $RV[NewValue]

 

That doesn't give the desired effect. It creates NewValue and stores "XXXXX-#" in it, what i was trying to do is make the variable name $RV[Login-#], so from anywhere in the script i could just pull a $RV[Login-$RV_LINEID] and get back only the $RV[Login] contents i evaulated in the eval module. But that's alright, if getting other variables mixed up between lines isn't a possibility then it doesn't matter. Thanks for your time.

Share this post


Link to post

OK, I now see what you were trying to do.

 

Right now (v5.1) the contents of the "assign result to following Result Variable" text box do not get checked for having Result Variables as part of the name - whatever is there is taken to be the literal name of the new Result Variable.

 

There was never any need to use RVs when specifying a name of new RVs - but I'll pass this on to our programmers - someone may find a need for it and it doesn't hurt to have this option...

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
×