Adding an "Input List" Control to a Screen

Navigation:  How to Work with Screens > Adding Input Controls to a Screen >

Adding an "Input List" Control to a Screen

Previous pageReturn to chapter overviewNext page

 

Control Purpose

 

This control is used to allow the operator to define data by selecting it from a fixed list. The data to be displayed by this control can be entered or come from a variable ("Text/Variables"), from values stored in a data file field ("Data File") or a local database table field ("Local Database"). This fixed list of values is fully displayed on the screen of the device.

The selected data is stored in user variables and can, then, be further processed or stored. See Variable Definition.

If your MCL-Designer V4 subscription includes Speech attributes, it will affect the "Input List's" use - this control will also accept speech input (operator speaking into the device) and provide output information (instructions to be heard by the operator).

 

This input control is added to a screen by dragging an "Input List" control from the top section of the "Control" tab OR  the "Preview" section onto the screen.

 

Step-by-Step

 

1. Drag the control onto the screen:

 

If dragged from the "Control" tab, the control will assume the default style. (See Set Default.)

 

If dragged from the "Style Preview Section", it will assume that particular style.

 

2. Now, double-click the selected control on the screen OR  the tree view to open the properties window.

 

 

The "General" tab is open by default.

 

3. In the "Source Type" option, select the source of the values to be displayed in the "Input List" control ("Text/Variables", "Data File" or "Local Database").

 

4. Fill in the available options according to the selected "Source Type":

 

When selecting the Text/Variables” option (the default option), follow these instructions:

 

a. Value to Display column

Define the name of each list item. Either enter the name of each item/button in the corresponding box or click and select a variable with the intended value. See Variable Definition.

 

b. Value to Return column

Fill in this column to provide an alternative text for each list item. Enter the alternative value or click to select a variable with the intended value.

 

Use the editing icons to the right of the table to move the rows up and down and to delete or add more rows.

 

c. In the "Store Selected Item (Value or Line Number) into Variable" option:

 

i. Var. (Value) - Click to select the variable that will receive the selected item value. See To Select/Create a Variable.

 

ii. Var. (Line No) - Click to select the variable that will receive the selected item line number.

 

d. Proceed to Step 5.

 

When selecting "Data File", the corresponding options become available. Proceed as follows:

 

 

a. In the "File Name" box, select a data file from the drop-down list. If required, click to edit the selected data file. See Editing a Data File.

 

b. In the "Field to Display" drop-down, select the data file field to be displayed from the drop-down list.

 

c. In the "Field to Return" drop-down, define the field that contains the value to return.

 

d. In the "Store Selected Item (Value or Line Number) into Variable" section:

 

I. Var. (Value) - Click to select the variable that will receive the selected item value. See To Select/Create a Variable.

 

II. Var. (Line No) - Click to select the variable that will receive the selected item line number.

 

e. Continue to Step 5.

 

When selecting "Local Database", the corresponding options become available. Proceed as follows:

 

 

a. In the "Table" drop-down, select the required table. See How to Work with a Local Database.

If needed, click to open the "Join Tables" window. See To Join Tables.

 

If a variable is used to define the local database table, the required field names must be entered manually and enclosed in square brackets [].

Ex: Table - "P_descending"

Field to Return - "[date]"

 

 

b. In the "Field to Return" option, define the field that contains the value to return.

 

c. Select the field to be displayed from the drop-down list.

 

If you have used a variable to select the intended table (step a), both drop-downs will be empty.

You must enter the name of each intended field manually and always enclose it in square brackets [].

 

 

d. In the "Store Selected Item (Value or Line Number) into Variable" option:

 

I. Var. (Value) - Click to select the variable that will receive the selected item value. See To Select/Create a Variable.

 

e. Continue to Step 5.

 

5. Go to the "Query" tab.

 

 

6. If the control's data source is a data file or a local database table, you can define a query using "where conditions" in the "Where Clause" table. The Query Assistant will help you define the criteria for the necessary "Where" clause(s) (fields, operand, value type).

Use the editing icons to the right of the table to move the rows up and down and to delete or add more rows.

If the query is not available or needed, continue to step 8.

 

 

Double-click the required row or click the corresponding .

 

 

And   Or

These logical operands are only available if there is more than 1 Where clause for this query.

Check “And” or “Or” depending on the query's purpose.

(...     ...)

If needed,check the most adequate parenthesis for your Where clause. (The parenthesis determines the order in which the defined conditions are evaluated.)

Table Field

Select the table field to be queried from the drop-down list or click to select a variable with that value.

Operand

Select a comparison operand from the drop-down list.

Num.

Check this option if the Where clause requires numeric values.

Text

Check this option if the Where clause requires text values.

Value/Field

Enter the intended value OR  select a table field from the drop-down list  OR  click to select a variable with the required value/table field.

Depending on the selected comparison operand, there can be more or less "Value/Field" options available.

Ex: The "EQUAL" operand only requires 1 "Value/Field" option. The "BETWEEN" operand calls for 2 "Value/Field" boxes.

Click to apply these options and return to the "Query" tab.

 

7.This option only applies if the data source for the "Input List" is a local database table. As an option, use the "Order By" table to sort the order of the table fields.

 

8. Go to the "Layout" tab.

 

 

9. Define the control's style by selecting an option available in the drop-down list or by clicking . See Editing and Creating Styles and Editing and Creating the "Input List" Style.

 

10. Position the values, within the control, with the alignment buttons.

 

11. Maintain the given values or specify the control's position/size, within the screen, by providing the "X" and "Y" coordinates as well as "Width" and "Height".

 

Detail of Position/Size values

 

 

 

12. In the "Control Settings" section, attribute a name to the control. This name is displayed in the tree view.

 

13. Consider whether or not to check the following options:

"Enable"

Activates the control's input feature.

"Tab Stop"

Must be checked to enable a "Change Tab Order". This provides the possibility to change the order (between data input controls) in which the information is keyed in by the operator.

"Visible"

Manages the control's visibility in the device's screen.

 

14. Define the "Input List Layout":

"Default Position

Defines the row that will be highlighted.

 

In case of navigation between this program and other programs, enter "0" to ensure that the default position is the highlighted row. This is the expected behavior:

I. The screen with the "Input List" is executed and the control's default position is the first row (value "1").

II. The operator selects a different row within the "Input List", for instance, row 3.

III. The operator or the application workflow calls another program and, then, returns to the same program/screen with the "Input List".

IV. The control's default position is the previously highlighted row - row 3.

In other words, the value for the control's default position was retrieved from a default local variable that stored the highlighted row's position (value "3").

 

"Scrolling"

When checked, this option allows for an up/down navigation of the list.

"Rolling"

When checked, this option will allow for a loop navigation of the list.

 

Use the right click in MCL-Designer's input boxes to access certain features regarding the input box's option as well as general actions such as "Copy"; "Paste"; "Search".

Ex: If you right-click the "Text Data" input box (included in a "Display Text" properties window), you are provided with the "Paste", "Search..." and "Variable Select" options.

If you right-click any other input box, it will provide other possibilities.

 

 

 

Speech Feature

If your MCL-Designer V4 subscription includes Speech attributes, you will have access to an extra tab - "Speech"- where you can define this control's speech possibilities.

 

 

All speech related options within this control are explained in another topic - see Speech in the "Input List" Control. Once you have gone through the topic, use the provided link to return to this step-by-step and continue to the "Actions" tab (step 15).

 

If your MCL-Designer V4 license does NOT have Speech attributes, the next tab is the "Actions" tab. Continue to step 15.

 

 

15. Go to the "Actions" tab.

 

Keep in mind that there is always a default event (ex: "On Change"; "On Timer"; "On Hotkey"; etc.) attached to the control (in this case, an "On Change" event). If you want the event to trigger an action, you must add processes to it (ex: "Go To"; "Check File"; "Set Focus"; etc.).

 

 

16. To edit the default event, double-click the event row ("On Change") OR  right-click the event row and select "Edit..." in the resulting menu. Either of these choices opens an "Edit Event" window.

 

 

17. Select from the drop-down (G) or (H) list:

 

F

This event, performed by the operator, is the "trigger" that enables an action to advance the application. It cannot be modified.

Default event: "On Change" - Is triggered when the operator enters data via the "Input List" control.

G

Provides targets for a "Go to" action (see Working with the Branch Processes Group). After the operator has fulfilled the "On Change" event, the workflow will proceed to the selected destination. If you want to add processes other than a "Go to", select the <Action> option.

H

Provides quick links for a "Go to" action ("Next Screen"; "Exit"; etc.) to be executed when the event is fulfilled. See Detail of a window below.

 

Detail of a window

 

This window is an alternative to the drop-down list of destinations:

a. Select a destination screen or routine within the same program as this control, in the left table.

b. Specify the target even more by selecting from the table to the right. The available options are a consequence of your choice in the left table.

c. If you want to add other processes to the execution flow instead of defining a target with a Go to process, select the <Action> option.

d. Finish this operation by clicking .

 

18. If required, add processes to the default event. See Adding and Editing Processes.

 

At this stage, the processes are being added to the default event (in this case, an "On Change"). The default event can, however, be ignored/overridden by adding other events (step 20).

 

 

This control has predefined local variables (only available in event context). See Input List's Predefined Local Variables.

 

 

19. If there is no need to add more events, click in the "Actions" tab to conclude the operation.

If the project requires more events, proceed to step 20.

 

20. Click (at the bottom of the "Actions" tab) to add a new event.

 

 

21. Select one of the available events (A) for this control ("On Timer" or "On Hotkey") and edit it (B or C,D and E).

 

 

On Timer

On HotKey

A

This event is an exception. The operator does NOT trigger an action, it is his lack of activity, associated to a predetermined period of time that triggers the action/process.

This event is used to attribute a keystroke function (in a virtual or hardware keyboard) to the Input List control.

B

Define the target/action to be executed. Select one of the available destinations OR <Action> if you want to add other processes.

Define the target/action to be executed after the event is triggered. Select one of the available destinations OR <Action> if you want to add other processes.

C

This alternative to B provides quick links for a "Go to" action ("Next Screen"; "Exit"; etc.) to be executed when the event is fulfilled. If you want to add other processes, select <Action>. See Detail of a window below.

This alternative to B provides quick links for a "Go to" action (ex: "Next Screen"; "Exit"; etc.) to be executed when the event is fulfilled. If you want to add other processes, select <Action>. See Detail of a window below.

D

Set the time interval, after which, the target/action (B or C) is executed.

Select the keystroke function that the "Input List" control will represent.

E

If required,check this option to set a repetition cycle.

N/A

 

Detail of a window

 

This window is an alternative to the drop-down list of destinations:

a. Select a destination screen or routine within the same program as this control, in the left table.

b. Specify the target even more by selecting from the table to the right. The available options are a consequence of your choice in the left table.

c. If you want to add other processes to the execution flow instead of defining a target with a Go to process, select the <Action> option.

d. Finish this operation by clicking .

 

It is possible to add as many of the available events as required by the project. (Repeat steps 20 and 21)

 

 

22. Edit the new event(s). Double-click the event row to be edited and open the "Edit Event" window. (Repeat steps 16 and 17)

Ex: The editing of an added "On Hotkey" event.

 

 

Define which keystroke function(in a virtual or hardware keyboard) the control represents.

Define the objective/action to be executed after the event is triggered. Select one of the available destinations from the drop-down or list OR <Action> if you want to add other processes.

 

23. These new events can include processes. See Adding and Editing Processes.

 

If you have more than one event, remember to select the event row you want to add processes to.

If you use the drag-and-drop method to add processes, make sure to drop the process on the row below the intended event.

 

 

Before concluding the addition operation, check the following:

 

Remember that the "Enable" option (located in the "Layout" tab) must be checked so that the added actions/processes run.

 

 

If required, use the icons located on the upper right corner of the properties window:

 

Click this icon to create a new data file. Go to Creating a Data File to see how to fill in the several options available.

It is only available if you select a data file as a data source.

 

Click this icon to create a new local database table. Check Creating a Table to see how to fill in the several options available.

It is only available if you select a local database as a data source.

 

Click it to view/edit the content of the table that was selected as a data source (this icon is only available if the control's data source is a local database table). See Viewing/Editing Table Data.

 

 

Click this icon to open a "Localization" window where you can edit the text element within that control or add translations to it. See Localization.

 

 

Click this icon to attach any relevant notes to this control. Enter your text in the resulting window. This information is displayed in the "Developer report". See Report.

 

 

24. Click in the "Actions" tab to apply the choices made.

 

The "Input List" has been successfully added to the screen.

 

 

 

If any subsequent edition of the control's properties is required, double-click the "Input List" OR  select " 'Input List' Properties" (in its right-click menu) to open the properties window.

 

 

 

Input List's Predefined Local Variables

 

This control has predefined local variables (only available in event context).

 

Event

On Change

Variable Name

L_Control_Name

L_Field_Value

L_Line_Number

Variable ID

&0a

&1a

&2a

Description

Stores the control's name (*)

Stores selected field value (**)

Stores selected field number

 

Event

On Hotkey

On Timer

Variable Name

L_Control_Name

L_Keycode

L_Control_Name

Variable ID

&0a

&1a

&0a

Description

Stores the control's name (*)

Stores the defined key code

Stores the control's name (*)

 

* Defined in the control's properties window ("Layout" tab).

** Defined in the control's properties window ("General" tab).