Siebel Consumer Goods Handheld Guide > Siebel Handheld Application Administration > Administering Barcode Settings for Siebel Handheld Applications >

Enhancing the Behavior of the Barcode Scan


If your business process requires that a specific barcode logic be performed when you perform a barcode scan using a handheld device, then you can enhance the behavior of your barcode scan. Enhancing your barcode scan behavior reduces the time taken to perform routine tasks with the scanner and quickly finds the correct record that needs to be updated.

The default behavior of a barcode scan results in the creation of a new record or the update of an existing record. However, if you want to find and update a record at the same time without having to use multiple key strokes, then you must define a new user property at the applet level.

To enhance the barcode scan behavior

  1. Create a new applet user property called TriggerFindRecord in Siebel Tools.

    For more information about creating TriggerFindRecord, see Defining the TriggerFindRecord.

  2. Create your barcode definition and add records to it identifying how the data will be parsed from the barcode.

    For more information about creating a barcode definition and adding records to it, see Creating New Barcode Definitions for Siebel Handheld Applications.

  3. Set your application views for barcode scanning.

    For more information about enabling an application view for barcode scanning, see Enabling Applications Views for Barcode Scanning.

Defining the TriggerFindRecord

To configure the behavior of your barcode scan, you must first define the user property TriggerFindRecord at the applet level in Siebel Tools. The syntax for TriggerFindRecord is as follows:

TriggerFindRecord = <Search fields> | <Activate field> | <Method> | <Action to apply>

The fields in TriggerFindRecord are described in Table 13. Examples also follow Table 13.

Table 13. TriggerFindRecord Fields
Field
Definition

<Search fields>

Key fields used for searching. Search fields must be separated by a comma, for example, as follows:

<Key field 1>, <Key field 2>, ... <Key field N>

<Activate field>

The name of the (focus) field that is activated in the UI after a record is found or added.

<Method>

This field defines what functionality needs to be performed on the barcode scan. Each applet can define only one method in the user property. The following methods (or process modes) are supported:

  • FindOnly—searches for matching records in a list based on key fields. If no record is found, no new record is created. If matching records are found, the first matching record is selected, and the specified <Activate Field> has focus. If no focus field is specified, users must click the field they want to update.
  • AddOnly—searches for a record in a list based on key fields. If no record is found, a new record is created. If matching records are found, the first matching record is selected, and the specified <Activate Field> has focus. If no focus field is specified, users must click the field they want to update. This method does not update any fields in matching records.
  • UpdateOnly—searches for a record in a list based on key fields. If no record is found, no new record is created. If matching records are found, the first matching record is selected, and its data is updated with the scanned data. Additionally, if <Action to apply> has been specified, the appropriate intelligent updates occur. If no focus field is specified, users must click the field they want to update. This method does not create new records if the scanned record does not exist in the list.
  • AddAndUpdate—searches for a record in a list based on key fields. If no record is found, a new record is created and the specified <Activate Field> is activated. If matching records are found, the first matching record is selected, and its data is updated with the scanned data. Additionally, if <Action to apply> has been specified, the appropriate intelligent updates occur. If no focus field is specified, users must click the field they want to update.

<Action to apply>

Separated by a comma, this field defines the action that will be applied to each field, for example, as follows:

<Field 1>,<Action> ^ <Field 2>,<Action> ... <Field N>,<Action>

The following actions can be applied to any field. Only one action can be specified for each field:

  • Add—adds the scanned value to the field value. If the field specified is nonnumeric, an error is returned.
  • Subtract—subtracts the scanned value from the field value. If the field specified is nonnumeric, an error is returned.
  • Replace—sets the scanned value on the field.

If no action is specified, the default action is to Replace the value in the field.

NOTE:  <Action to apply> applies to the UpdateOnly and AddAndUpdate methods only.

Example 1: FindOnly

In the following example, Product Code and Lot# are specified as the key fields on which the search is based and Qt1 will be the activated field when the record is found:

TriggerFindRecord = Product Code, Lot# | Qty1 | FindOnly

Example 2: AddOnly

The following example specifies Product Code and Lot# as the key fields on which the search is based. If the record is found, then it is selected. If no record is found, then a new record is created with the scanned information, and Qty2 will be activated when the record is found or added:

TriggerFindRecord = Product Code, Lot# | Qty2 | AddOnly

Example 3: UpdateOnly

The following example specifies Product Code and Lot# as the key fields on which the search is based. UpdateOnly is specified as the method so the fields of any found records will be updated with the scanned information. The scanned Qty1 will be added to Qty1, the scanned Qty2 will be added to Qty2, and no field will be activated when the record has been updated:

TriggerFindRecord = Product Code, Lot# | | UpdateOnly | Qty1, "Add" ^ Qty2, "Add"

Example 4: AddAndUpdate

In the following example:

  • SKU Code is specified as the key field on which the search is based.
  • AddAndUpdate is specified as the method, so the fields of found records will be updated with the scanned information or a new record will be created with the scanned information.
  • The scanned Qty1 will be added to Qty1.
  • The scanned Qty2 will be subtracted from Qty2.
  • The Expiry Date will be set.
  • Qty1 will be the activated field when the record is found or added and updated.

    TriggerFindRecord = SKU Code | Qty1 | AddAndUpdate | Qty1, "Add" ^ Qty2, "Subtract" ^ Expiry Date, "Replace"

Siebel Consumer Goods Handheld Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.