Overview

TransLution supports the ability to run  Visual Basic code directly from TransLution. This functionality is called the VB Provider. 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.

VBP can be very powerful but of course requires development skills both to build and maintain. We recommend using core TransLution functions as far as possible.

 

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. It is also possible to link subroutines to any function in EazyTouch or Android grid. Subroutines are much easier to maintain and do not require developer skills to build. We recoemmend using subroutines wherever possible.

VBP Steps - This option allows VBP to be excuted in a function 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. This is required when the VBP step will be called from a Windows or Android scanner.

 

 

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