How to deal with enumerations

Hi,

my REST Service returns numbers for specific values. What is the best way to show a specific text value per number? The list is static; so value 1 stands for Text 1 etc. The list is 25 possible values.

The numbers are used on different app screens.

Any hint is welcome.

Thx.

Hi @Karsten_Voigt, you could make a list of texts type app variable enums with an initial value, for example:

Then appVars.enums[number] will give you the associated text. Note that if the numbering starts at 1 you need to either add an item for index 0 or use appVars.enums[number - 1].

Thx. That is easy :slight_smile:

1 Like