Jump to content


< Back to Forum


 

Pass $rv Value From Line A To Line B


  • Please log in to reply

#1 SupportTeam 11 December 2015 - 01:09 PM

The simplest approaches to pass a value from Line A to line B are:

 

 

1.

VBScript running on line B calls RvGet function with line A's Line Id as first parameter.

 

or:

 

2.

VBScript running on line A sets the RV on line B, using the RvSet function.

 

 

So the actual test scripts would look something like this:

 

 

 

1.

VBScript running on line B calls RvGet function with line A's Line Id as first parameter :

 

set vg = CreateObject("vgServices.CommandLink")
sReturnedData = vg.RvGet($RV[AAAA],"RV[client_lineid]")
vg.Run_ResultReturn $RV_LINEID, "[lineB_copy]{" & sReturnedData & "}"
set vg = Nothing
 
Replace $RV[AAAA] above with $RV that holds the LineId of the line A.
 
And then use a Say Number module to speak out $RV[lineB_copy] as a number.
Note that the VBScript module running the above must be set to "Wait until VB Script completes".

 

 

 

 

2.

VBScript running on line A sets the RV on line B, using the RvSet function :

 

This approach would need for you to ensure that line B does not go to the module that uses the RV until after that RV was set from line A. Easiest way is to make the VBScript running on line A to make the script on line B jump to specified module after the RV has been set. So something like this can be used:

 

 

set vg = CreateObject("vgServices.CommandLink")
vg.RvSet($RV[BBBB], "lineB_copy", "$RV[client_lineid]")
vg.Script_Goto $RV[BBBB],"my_script.vgs", "mymodule", ""
vg.Run_ResultReturn $RV_LINEID, "success"
set vg = Nothing

 

or just this :

 

set vg = CreateObject("vgServices.CommandLink")
vg.Script_Goto $RV[BBBB], "my_script.vgs", "mymodule", "[lineB_copy]{$RV[client_lineid]}"
vg.Run_ResultReturn $RV_LINEID, "success"
set vg = Nothing
 
 
Module mymodule in script my_script.vgs could just be a say Number module that speaks out $RV[lineB_copy] as a number.