The following document contains examples of forms, using different possible values of the Form configuration.

1 Attribute Form Settings

Form with Same Field Columns as Form Settings

In this example, we will create a form with var_warehouse fields. If the user has previously executed form settings (term_wms_settings), this form will automatically retrieve the data from the previous execution form.

Preparing the second form will return the warehouse code from previous form settings.

1.1 Create the Form Head

  • Choose form settings: term_wms_settings

When the user executes a form with settings form param, the program will automatically search to check whether the form settings fields are stored in the session. If not, the system will execute the form settings automatically and return to the settings form.

The second form will list the stock of an item.

  • Choose the Report action
  • The SQL statement is shown below:
Copy
SELECT item_code, item_location, stock 
      FROM term_wms_stock 
    WHERE warehouse_code = '@warehouse_code'

1.2 Create a Group

Create the group before creating the fields.

In this example, we only need one group to include the fields.

1.3 Create Form Fields

In this case we need 2 fields.

  1. field warehouse_code, automatically filled from fields in session.
  2. field item_code, to show the stock of the selected item.

1.3.1 Parameters of the warehouse_code Field

  • Field of 'group 1' at head group.
  • Code 'warehouse_code' related to the field in the term_wms_settings form.
  • Label Warehouse. Simply indicates that the input field corresponds to a warehouse code.
  • Mnemonic 'warehouse_code' Show tag in zone scroll.
  • Mode 'Display' Makes the field display (no-input).
  • Type 'char'. Indicates that the related column 'warehouse_code' is a char.
  • Required 'No'. Indicates that it is not mandatory to enter a warehouse code.
  • Hide 'No' No input.
  • Spoken 'No' Text-to-speech not enabled.

1.3.2 Parameters of the item_code Field

  • Field of 'group 1' at head group.
  • Code 'item_code' related to the field in the term_wms_settings form.
  • Label Item. Simply indicates that the input field corresponds to an item code.
  • Mnemonic 'item_code' Show tag in zone scroll.
  • Mode 'Display' Makes the field display (no-input).
  • Type 'char'. Indicates that the related column 'item_code' is a char.
  • Required 'Yes'. Indicates that it is mandatory to enter an item code.
  • Enters validation parameters to ensure that a specific set of values is entered. In this case, rather than enter an item value, the user selects from a preset list of values from the table term_wms_item. To perform this validation, fill out the helper box.
  • Hide 'No' No input.
  • Spoken 'No' Text-to-speech not enabled.

1.4 Add the Form to a Menu

1.5 Execution

Execution
When the form is executed, automatically load the warehouse value from the previous form.

2 Attribute Label Layout

Forms include an attribute to indicate label position. This attribute can be set as one of two options: automatic (auto) and vertical.

The automatic option sets the layout with the description fields to the left of the input fields. It is based on the screen size of the user device; the description fields automatically change position and are set above the input fields. This label design is the default option.

The vertical option sets the description fields above the input fields, without taking the size of the screen into account.

2.1 Example

This example shows two types of label layout with the same form, as explained at Action insert.


Choose the same form described in the Insert Action section of Forms documentation.

And choose Auto type in Label layout.

2.1.1 Execution

Web Terminal Execution
In this example, we choose the Auto type in Label Layout. In this example, we choose the Vertical type in Label Layout.

3 Form Exit Attribute

The 'exit' attribute in forms is used to return to the menu after the form action has been performed. It applies to forms where only a single iteration is typically performed.

3.1 Example

User wants to print the form from a specific location.

  • The form contains an item_location field, and the form action is to generate a report with an SQL statement.

3.2 Step-by-Step Process

3.2.1 Create the Form Head

  • Choose the Procedure action.
  • Add the exit parameter.
  • Indicate the SQL statement which will be executed at each iteration.
  • The 'where' statement includes the variable item_location, entered by the user at each iteration in the form.

In this example, the code is an XSQL-Script call.

Copy
<call name='term_print_codubi'>
        <args>
            <arg>@item_location</arg>
        </args>
    </call>

Or Native proceudre

Copy
EXECUTE PROCEDURE term_print_codubi('@item_location')

3.2.2 Create a Group

Create the group before creating its fields.

In this example, we only need one group to include the item field.

3.2.3 Create Form Fields

Add one field to the form with the following parameters:

  • Field of 'group 1' at head group.
  • Code 'item_location' related to the form head SQL statement.
  • Label Location. Simply indicates that the input field corresponds to an item code.
  • Mnemonic location_code. Show tag in zone scroll.
  • Mode 'Input'. Field viewable and editable.
  • Type 'char'. Indicates that the related column 'item_code' is a char.
  • Required 'Yes'. Indicates that it is mandatory to enter an item code in this case.
  • Hide 'No'. Sets the field type as input and lets the user enter a value.
  • Spoken 'No'. Text-to-speech not enabled.

3.2.4 Add the Form to a Menu

3.3 Web Terminal Execution

Web Terminal Execution

4 Form Confirmation Attribute

Forms contain an attribute used to display a confirmation message at each iteration of the form.

4.1 Example

This example shows the message [Are you sure?] before executing the form action.


Choose the same form as the Delete Action section of Forms documentation.

Next, add a confirmation parameter:

4.1.1 Execution

Execution
Form displays a message with confirmation dialog.

5 Classification Attribute

The classification field is used to classify screens. When this field is indicated, the RF can keep a record of logins.

6 Display Count in Menu

To add a counter to a menu option, simply add an SQL statement to the field COUNT statement.

The view in the menu appears as below: