Author Topic: Smartattributes - rf_autotab  (Read 7584 times)

Benjamin Dasari

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 96
    • View Profile
Smartattributes - rf_autotab
« on: October 05, 2017, 11:19:44 AM »
Purpose:
Smart Attributes are special settings that you can attach to a given edit field.
The auto-Tab smart attribute is designed to eliminate the necessity for users to manually tab after entering data into a field.
While it can be used for situations where users are manually entering text, the most common usage is with barcode readers where field entry is performed by doing a scan.

The auto-tab specifies a given number of seconds before the process will proceed to the next field.
The key is "rf_autotab" and the value will be an integer that specifies the time to wait in seconds.
The counter begins and resets when any character is entered into a field marked with this attribute.
The way it works is that once a character is entered, Mobile will automatically tab to the next field when the delay time is passed.
If a barcode scan is performed, Mobile will auto-tab to the next field one second after the scan is completed regardless of the value specified for the auto-Tab attribute.
If there is a significant pause in the data entry (currently set at five seconds), Mobile will assume the user is done entering text on that field, but will not tab to the next field.

Since auto-Tab is treated the same as a 'done entering text' signal, pattern-matching and validation can also be performed on the fields after an auto-Tab occurs.

NOTE:
Make sure the "Smart Attributes -> Auto Tab" is checked in "Advanced Setting" tab in the Profile settings of a mobile device.

Syntax:
{"smartattributes":"rf_autotab=3"}     // autotab set to 3 seconds
   

Liquid UI Code:
----------------------------------------------------------------------------------------------------------------------------------------------
Script File Name: SAPLSMTR_NAVIGATION.E0100.sjs       // Easy Access
----------------------------------------------------------------------------------------------------------------------------------------------
clearscreen();
inputfield( [1,1], "Material", [1,14], {"name":"z_cork_matl", "size":18, "required":true, "smartattributes":"rf_autotab=3"});
inputfield( [2,1], "Batch", [2,14], {"name":"z_cork_bat", "size":10, "required":true, "smartattributes":"rf_autotab=3"});
inputfield( [3,1], "Quantity", [3,14], {"name":"z_cork_qty", "size":10, "required":true, "numerical":true, "smartattributes":"rf_autotab=3"});
inputfield( [4,1], "Stor. Loc.", [4,14], {"name":"z_cork_sloc", "size":4, "readonly":true});
pushbutton([6,1], "@2L@Partial Confirm", {"size":[2,26], "process":cork_partialConfirm});


See attachments for code samples!
« Last Edit: October 05, 2017, 05:14:26 PM by Benjamin Dasari »