QR Code Example
**Requires WOW QR Code Add-On product. Contact PlanetJ by email to info@Planetjavainc.com to obtain a copy.
QR Codes are similar to a bar code and can contain data that can be read by a mobile device's camera. The mobile device needs to have a QR code reader installed. Once these codes are scanned by these devices, they can provide users with a URL, contact information, SMS or similar links to information right on the mobile device. You can use WOW to create applications that run in a smart phone's browser and access data from your DB. There are automatic features built in to WOW that will "assign" an individual QR code to your DB rows. This might be useful with inventory or HR application.
As a live example, let's create a set of applications that 1) can manage data entry of workers and associated training; and 2) can scan a QR code to associate to the worker and provide feedback on what training sessions they have completed. Assume we will have each worker's QR code printed on a name badge so would be scanned in work field.
These samples were created after setting up MySQL database schemas.tables of WORKERSDB.WORKERS, WORKERSDB.TRAINING and WORKERSDB.WORKERS2TRAINING
Create the Admin application.
Create an operation to return data on each worker. Note the d_ fields. These are called "derived fields" and are a "virtual" field. This field is defined by a field descriptor, just a like a normal field, yet it does not actually exist in a physical file. It is simply a container field that can be used to return any value needed. It can be handled and manipulated just a like an actual database field. For more information on derived fields, go to this section in WOW Builders guide.
Within this operation, it is also necessary to set the Row Class to planetj.dataengine.fileupload.RelativeFileUploadRow in the Advanced Section of the WOW Builder.
Run the application and create your Field Descriptor for your derived FD for QR code by clicking on the red gear icon associated with that field:
In the FD manager, set the Display Component of the derived Field Descriptor of the QR code to "QR Code" which will bring up HTML shown below. By setting the display component, it is telling WOW to assign a unique QR code to each record for the ??value of the OID. This component uses Google QR generation API. (End users are responsible for any licensing considerations) In the user defined HTML, notice how the URL must be escaped. The & character is replaced with %26. Any other special characters should also be escaped as described here: http://www.w3schools.com/tags/ref_urlencode.asp
Create the second Application. In the example below, derived fields are being used to pull the fields without displaying the column header. This will allow the formatting to include the last name and first name without actually including the headers, which works better with the display on a smaller device.
Example:
set the Field Descriptor Type (to derived, if the field is a derived field, being created).
create an Association Operation for worker/training.
Now, assume that the worker is provided a badge with a QR code and their last and first names and picture. Using a mobile QR scanning device, scanning the QR code will return something like:
*note, the above image is what will be shown on the mobile device.