How to create an ENUM (Value, Label, Value, Label)

I have an ENUM field where the stored value should be "Y" or "N" but the label will be a longer description. I thought I'd be able to use LIST() but I don't believe it allows for the label. Is there another function I can use to list (value, label, value, label)

My ENUM option list would need to look like this:

"Y", "Weight Capsack1"

"N","Weight Capsack2"

 

Thanks so much for your help

 

 

0 6 129
6 REPLIES 6

I would make it simple as possible for easier work and develop. Why not use enum like,

Y (Weight Capsack 1)

N (Weight Capsack 2)

If Y and N are used as logical-enum, then just change to text-enum,

Weight Capsack 1

Weight Capsack 2

You could for example put the value explicitly in your Label column, like:

'"Y", "Weight Capsack1"'

Generally speaking, you'll hear me say this a million times, the answer to most of your app sheet problems is more....

More columns, more tables, more steps, more time, more more more.

In this instance, why not add another table to store the value label pairing? By nature with references, the system stores one value and shows something else (if you turn on a label).

  - why not just make use of this system for your use?

For a number of tables, as long as they're done for normalization sakes or performance optimization, I'm okay with it.

If you didn't consider it already: Maybe a Yes/No column with custom display values would meet your need.

dbaum_0-1657470972563.png

 

A million thank you's for the ideas everyone.

The key is I'll need to store Y or N in the table (and display the other text) due to a great deal of configuration already in place based on the Y/N data (client just decided they'd like to change).  I was hoping not to have to create a new table just for the 2 data points but it seems it may be the only solution for now.

Thanks again everyone!

Top Labels in this Space