Case Structure Selector Label Only Displays Numeric Values With Enumerated Control

Updated Oct 27, 2023

Reported In

Software

  • LabVIEW

Issue Details

The selector label of my case structure isn't displaying the string values of my enumerated control that I have wired into the case selector. Why am I seeing this behavior?

Solution

This behavior may be caused when other enumerated constants or controls used in the transition from one state to the next don't match with the enumerated control that wired into the case selector. When this happens you will see coercion dots as shown below.

These coercion dots indicate that the data doesn't match between the enumerated constants. These coercion dots will show up in each subdiagram of the case structure, even in those in which the enumerated constant data does match.

To rectify this behavior, check each enumerated constant for each subdiagram to verify that it does match. In this example, the enumerated constant in case 0 had a misspelling which caused the problem as seen below.

By fixing this misspelling, the selector label will automatically update with the string values of the enumerated constants, shown below.


To prevent this behavior, it is highly recommended to create a type definition for your enumerated control/constant. A type definition will allow you to make updates to a single file which will update all the instances linked to the type definition in your application. This will ensure that all the enumerated constants/controls that are used in your application always have matching data.