Custom Barcode-Driven Form: General Information
A user interacts with a barcode-driven form mostly via text commands that the user enters or scans into a special field of the form. The form guides the user through a certain input route by showing different input prompts.
Learning Objectives
In this chapter, you will learn how to create a custom barcode-driven form.
Applicable Scenarios
You create a custom barcode-driven form when you need to simplify the work with the form to the level of sequential text inputs.
Creation of a Custom Barcode-Driven Form
When you create a custom barcode-driven form, you perform the following steps:
- Add a barcode scan class and implement its functionality, as demonstrated in Barcode Scan Class: To Create a Barcode Scan Class.
- Create a scan mode and implement its required properties, as illustrated in Barcode Scan Mode: To Define the Required Properties.
- To define the scan mode, do the following:
- Define the list of scan states for the scan mode, as demonstrated in Barcode Scan States: To Create the Set of Scan States.
- Define transition rules, as shown in Barcode Scan Transitions: To Implement Transitions.
- Define the list of commands, as illustrated in Barcode Scan Commands: To Define the List of Commands.
- Define the list of mode redirects, as shown in Scan Mode Redirects: To Define the List of Redirects.
- Define the resetting logic of the scan mode, as illustrated in Reset of Barcode Scan Mode: To Define the Resetting Logic.
- Implement scan states as follows:
- Create an input state, as shown in Barcode Scan States: To Create the Input State.
- Create a confirmation state, as described in Barcode Scan States: To Create the Confirmation State.
- Alter the predefined scan states, as shown in Extension of Scan Components: To Extend Predefined Scan States for a Custom Form.
- Implement scan commands by doing the following:
- Define custom commands, as described in Barcode Scan Commands: To Add Quantity Support.
- If you want to add logic that handles quantity input, add quantity support command, as specified in Barcode Scan Commands: To Add Quantity Support.
- Add an ASPX page, as shown in Custom Barcode-Driven Form: To Create an ASPX Page.
ASPX Page of the Form
In the ASPX code of the page, you need to include the following required parts:
- The script that causes focus to be kept on the
Barcode
field's control - The script that plays the sound that corresponds to the message type of the barcode-driven engine
- The PXDataSource control that binds to the host graph of the barcode scan class, but not to the barcode scan class itself