Enumerate conditions from an integer

I’m wondering if there is a convenient node to use in a workflow to enumerate various conditions from an integer number?

For example, 127 = high voltage, 128 = low voltage, 129 = low coolant, etc etc.

I’d probably recommend using a Data Table to store details for each error code. You would then use a Table: Get Rows node to look up the error details based on the incoming number.

1 Like

@Brandon_Cannaday Or possibly a global application variable (key/value)?

@paul_wareham for something as simple as your use case, where you just need to map a number to a string (“high voltage”), then yes, application globals would work just fine. However if you wanted to tie more properties to each of those conditions (i.e. a phone number to send a text message to when that condition hits, or additional data that can be gleaned from the code provided), then Brandon’s recommendation of using a data table would be better.