Warning: Deprecated since GeneXus X Evolution 2 Upgrade 3. Use the ScannerAPI external object (X Evolution 3) instead.
This article is a short guide to show how to configure and use this method.
In this example we will use the following Transaction object, with the Work With object (WWSD) applied:
As you can see the ScanBarCode method returns a variable of VarChar(200). The name of the variable is ScanBarcode.
Add the action to de WWSD:
After scanning the barcode we want to use that value.
We can call a Procedure object in a composite action which uses that information. (This is one way to use the information obtained, there are many ways to use it).
The procedure we are going to use is the following:
where ProductId = &ProductId
ProductNumber = &ScanBarcode
And the following rules:
We have to make a composite action that will first scan the barcode, get the value scanned, and send it to a procedure to use that value.
The ScanBarcode method returns the value scanned. This value is return in a VarChar(200), so we have to have a variable in our WWSD to save this value.
The variable is as shown bellow:
The event with composite action:
&VarCode = Interop.ScanBarcode()
Done. When scanning a code it will call the procedure to save the number in the attribute ProductNumber of the Transaction.
- In iOS this SDApi is available for iPhone, iPad2 and iPod with iOS 4.X
- For Android it is needed to have the ScanBarcode app installed from the AppMarket.