Overview

TransLution supports the ability to run  Visual Basic code directly from TransLution. This functionality is called the VB Provider. There are some key advantages to using this functionality rather than VB scripting. However powerful the scripting functionality is, the key disadvantage is that the application called or the processing that was done was asynchronously to TransLution. This means that there was no way to link the TransLution processing to the result of the VB script. VB Provider solves this by running the VB application synchronously with TransLution. VBP works on Custom buttons in EazyTouch and Android and on VBP steps on all three platforms. There are some specific requirements for using VBP on Android forms described here.

 

There are different ways to use VBP functionality.

 

VBP Buttons - It is possible to create buttons on the EazyTouch form that can either be linked to a specific function area or can be used across all scanner functions

VBP Functions - It is also possible to execute VBP code after a successful scan or when a TL Selector or General Grid Post is done. These functions do not create visible buttons

VBP Steps - This option allows VBP to be excuted in a finction running on a scanner. The VBP step can be configured to run on the server so while VBP runs during a scanning function on any platform the execution of the code happens on the server.

 

 

VBP Functions and Parameters

It is important not only to know where VBP buttons are available but also to understand what information is passed to each button. The real value of the VBP code is the ability to interact with the data entered or selected by the operator and in order for that to happen, the VBP code has to be supplied with certain data.

In addition to relevant business process data you will notice that all information passed to the VBP code also includes the Connection String, DeviceName and SourceCodeID.

The device name was added to allow us to manage the ability to store reports and labels in the database. In order to check if your device has the latest version of a report it is necessary to know which device you are on. The source code ID was added as a useful way to manage which code is being execute and when. By making the connection string part of the data passed to the VBP cde, the code can become database and server independent since this information no longer needs to be included in the VBP code.

 

(strConnection ,strIDs, strScannerName, intVBPID, Optional strPrompt As String = "")

Below is a list of TransLution buttons that support the addition of VBP and the parameters passed to each one:

btnConcurrentFinish - The Finish button on the concurrent overlay (ConnectionString, JobID, DeviceName, SourceCodeID)

btnConcurrentSave - The Save button on the concurrent overlay (ConnectionString, JobID, DeviceName, SourceCodeID)

btnFinish - Job Finish (not with an autoclose) - (ConnectionString, JobID, DeviceName, SourceCodeID)

btnGeneralPost - The Post button on the General Grid form (ConnectionString, DeviceName,SourceCodeID, SelectedIDs). The selected IDs are the IDs of the selected rows as logged in the TL General Grid Audit Trail Table.

btnLoginFormVBP - VBP for the Login form (intended to allow a keyboard to be opened)

btnOK2 - When OK is clicked (i.e. after a scan. ConnectionString, SelectedIDs, JobID, DeviceName, SourceCodeID)

btnPostToSyspro - Post button on the TL Selector Grid. (ConnectionString, SelectedIDs, DeviceName,SourceCodeID). The selected IDs are the IDs of the selected rows as logged in the TL General Grid Audit Trail Table.

btnTestMethodResultsCaptureSave - Save on the Test Method Results Capture form (ConnectionString, SampleBarcode, DeviceName,SourceCodeID)

 

btnTouchScreenScanner1 - Touch Screen Button 1

btnTouchScreenScanner2 - Touch Screen Button 2

btnTouchScreenScanner3 - Touch Screen Button 3

btnTouchScreenScanner4 - Touch Screen Button 4

btnTouchScreenScanner5 - Touch Screen Button 5

The standard buttons above are all passed the ConnectionString, JobID, DeviceName and SourceCodeID.

If there is no active Job then 0 is passed as the job ID