Skip to main content
Skip table of contents

Multiple selection list

In the library JCmpVisuBasic, the following input objects are available for the creation of multiple selection lists:

MultiSelectElementDirect: Multiple selection option as a dropdown list.

MultiSelectionElement: Multiple selection option in a separate window.

For all MultiSelectionElements, the same variable type stMultiSelectionBoxType is used.

VAR
// Example for multi selection element
stMultiSelection : JCmpVisuBasic.stMultiSelectionBoxType;
END_VAR

If you now drag the desired object from the Visualization Toolbox into the process screen, a parameter window opens. Here you can assign the variable to the parameter for the input window.

image-20240112-093229.png

It is also possible to enter or change the parameters afterwards via the object property.

image-20240112-093250.png

The structure variable JCmpVisuBasic.stMultiSelectionBoxType contains the following variables:

image-20240112-094632.png

Only the following variables are required from the structure variable:

stMultiSelectionBoxTyp:

wsTitleText: Header for the selection window (only for MultiSelectionElement).
wsList: Transfer of the texts, which should be displayed in the selection list/window.
uiIndex: Indicates which text line has been selected.

In the first example, MultiSelectElementDirect is used. A selection list opens when clicking on the input field.

image-20240112-095103.png

In the second example, MultiSelectElement is used. A selection window opens when clicking on the input field.

image-20240112-095123.png

The code for both examples could look like this:

image-20240112-100555.png

The inputs Text 01, Text 03 and Text 05 selected in the example result in the value 21 in the BCD code. A BCD conversion must be carried out in order to be able to read the selections.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.