VoiceGuide IVR Software Main Page
Jump to content

Results Variable And Db Query

Recommended Posts

I am using a query and usually the result should be at least 100 lines by 6 columns, i need to copy this data into word so i will be able to fax a properly formatted page.

My question is quite basic:

How do i move on to the next line? if i'm using a result variable to access the data like this: $RV[ModuleName_$RV[row]_1] how do i increment the RV, (i know that i can do it in Evaluate expression but then it means i need to get out of the script each iteration which is cumbersomeh).

 

Thanks.

Share this post


Link to post

I might have not explained myself properly so here's part of the script:

 

for counter=1 to $RV[GetResults_RowCount]

myTable.cell(RowNum,ColNum).range.Insertafter($RV[GetResults_$RV[RowRes]_1])

myTable.rows.Add

RowNum=RowNum+1

counter=counter+1

next

 

I've defined RowRes in a previous module to 1.

So how do I increment $RV[RowRes] from 1 to 2 to 3 etc.?

I've manage to get the value but that doesn't help me, i've tried to set it but either i'm using a wrong syntax or it's not possible and the value stays 1.

 

Thanks.

Share this post


Link to post

The way that Result Variables work when used within a "Run VBScript" module is that they get replaced by their current value and then the VBScript is ran just like any other VBScript...

 

Have a look at this approach:

 

set vg = CreateObject("VoiceGuide.CommandLink")
for counter = 1 to $RV[GetResults_RowCount]

 sRvToRetreive = "RV[GetResults_" & counter & "_1]"
 sReturnValue = vg.RvGet($RV_LINEID, sRvToRetreive)

 myTable.cell(RowNum,ColNum).range.Insertafter(sReturnValue )
 myTable.rows.Add
 RowNum=RowNum+1

next
set vg = Nothing

 

I assume that ColNum was set previously...

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
×