How can different user defined texts be displayed based on different values of a data signal?

Q

How can different user defined texts be displayed based on different values of a data signal?

A

First of all the different texts need to be defined as global variables in an Enum List.

Use right click on "Global Parameters/Add Global List..."

Give the list a resonable name and configure the columns needed.

The value "key" will be always present and defines the value to be enumerated through.

In the example below one single column "value" is added. "value" is defined as string data type.

At last choose a Default Number Display and drag and drop it to your screen and in its parameter specify the "Enum List" just created as data reference.

Specify a "base" address as data source and then the text values will be displayed as the value changes.

For getting the values of the filed "enumList" the following example code can be used:

var enumList = webMI.query["enumList"];

var MyList = [ ];

for(var i in enumList)
     MyList[i] = enumList[i].value;