Skip to main content
Skip table of contents

Selection list

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

SelectElementDirect: Selection option as dropdown list.
SelectionElement: Selection option in separate window.

For all SelectionElements, the same variable type stSelectionBoxType is used.

VAR
// Example for selection element
stSelection : JCmpVisuBasic.stSelectionBoxType;
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-20240111-135323.png

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

image-20240111-135415.png

The structure variable JCmpVisuBasic.stSelectionBoxType contains the following variables:

image-20240111-140001.png

Only the following variables are required from the structure variable:

stSelectionBoxType:

wsTitleText: Header for the selection window (only for SelectionElement).
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, SelectElementDirect is used. A selection list opens when clicking on the input field.

image-20240111-140754.png

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

image-20240111-142517.png

The code for both examples could look like this:

image-20240111-142555.png
JavaScript errors detected

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

If this problem persists, please contact our support.