AVRESTOREAVALUE and AVRESTORENVALUE are handled asynchronously in the VLF-ONE execution environment. This is different to how these script functions are handled in other RAMP execution environments.

In order to restore a value in RAMP-ONE in you must:

Request it:

     if (objFramework.ExecutionEnvironment == "ONE")
{
   /* special handling in VLF-ONE */
   AVRESTOREAVALUE("Not found", "TSTM92337", "A","B",3, "ENG") ;
           }

Handle the event when it arrives. Add an event handling routine like this:

     /* ====================================================== */
/* ==================== AVCLIPBOARDEVENT ================ */
/* ====================================================== */
/* "RESTORE", bFOUND, sVALUE, sID1, sID2, sID3, sLANG, sINST,sTYPE */

vHandle_AVCLIPBOARDEVENT: function(WithId, bFOUND, sVALUE, sID1, sID2, sID3, sLANG, sINST,sTYPE)
{
var sText = "";
 
if (WithId == "RESTORE")
{
 
  if (bFOUND)
  {
   sText += "RAMP script received AVCLIPBOARDEVENT with Id " + WithId;
   sText += "\r Found = " + bFOUND.toString() ;
 
   if (sTYPE == "N")
   {
    sText += "\r Value = " + sVALUE.toString();
   }
   else
   {
    sText += "\r Value = " + sVALUE;
   }
 
   sText += "\r id1 = " + sID1;
   sText += "\r id2 = " + sID2;
   sText += "\r id3 = " + sID3;
   sText += "\r language = " + sLANG;
   sText += "\r instance = " + sINST;
   sText += "\r type = " + sTYPE;
  }
  else
  {
   sText = "RESTORE Value not found";
  }
 
alert(sText);
}
 
return(true);
},

vHandle_AVCLIPBOARDEVENT parameters are:

Parameter Name

Parameter description

sWithID

Required. String containing the event identifier.
Can be RESTORE.

bFound

Required. Boolean indicating whether a value to be restored was found

sValue

Required. The value restored from the clipboard. Can be a string or a number depending on the type parameter.

sID1

Required. String or number. Clipboard identifier 1

sID2

Required. String or number. Clipboard identifier 2

sID3

Required. String or number. Clipboard identifier 3

sLanguage

Required. String. 3 character language code

sInstance

Required. Number. The instance of the saved value

sType

Required. String. The type of the value

Can be:

N = Numeric

A = Alphanumeric

  • No labels