VoiceGuide IVR Software Main Page
Jump to content

Multi-row Result Variables

Recommended Posts

With VG 4.9.0 I could return a multi-rowed Result Variable as

$RV[ModuleTitle_ColumnIndex_$RV[RowIndex]] in a VBScript file.

That doesn't seem to be working any longer. Below is a code snippet which is accessing a multi rowed Result Variable. The code, which ran properly under 4.9.0, began failing when I loaded 5.0a. The variable "Counter" in this case has a value of one (1) as shown in the code snippet below. Also included below are the contents of the file "Translate App Type.txt" which shows the actual values returned.

const ForWriting=2
iCtr=$RV[Counter]
filename="Translate App Type.txt"
set fso=CreateObject("Scripting.FileSystemObject")
set ts=fso.OpenTextFile(filename,ForWriting,True)
    ts.Write "Counter Value="
    ts.Write("$RV[Counter]")
    ts.Write vbcrlf
    ts.Write "Translated with a Results Variable="
    ts.Write("$RV[GetAppTypeRecords_1_$RV[Counter]]")
    ts.Write vbcrlf
    ts.Write "Translated without a Results Variable="
    ts.Write("$RV[GetAppTypeRecords_1_1]")
ts.close

File "Translate App Type.txt" contents...

Counter Value=1

Translated with a Results Variable=]

Translated without a Results Variable=Promotion

 

As can be seen above, the result of $RV[Counter] is 1.

When used with "$RV[GetAppTypeRecords_1_$RV[Counter]]" a right bracket is returned "]".

When used with a hardcoded "1" in "$RV[GetAppTypeRecords_1_1]" the actual valued of the Result Variable "Promotion" is returned.

 

Can you advise me of a way to use a variable to cycle through the values instead of having to hard code the RowIndex value?

Share this post


Link to post

We've just checked this and can confirm that this is a problem with v5.0a

This issue will be resolved in soon to be released V5.1 Beta3.

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
×