Field aliases in views

I’ve always thought list aliases were a good idea “in theory” but there seems to be a limited use for them if you can’t display the “long” value in a view.

Am I missing something, or is it true that the only way to show the long value represented by a list alias in a view is to hard-code the values in the column formula, like this:

@If(val = “1”; “One”; val = “2”; “Two”; “invalid value”);

We want to use aliases for a status field, where the document displays things like “In specialist’s queue”, or “Awaiting customer feedback”, but stores values like “10”, “20”, etc.

It seems to me of little value to use the alias if I have to hard code the list of long values in a column formula in every view that shows status! Since I can’t use an @DbLookup in a column formula though, I can’t see what other option there is.

Is there any other way to show the correct long value in a view column other than the hard-code method?

Thanks in advance,

Beth Villanyi

Subject: Field aliases in views

No, but the hard-code method doesn’t have to be a long @If. The point of aliases is that they can mean different things at different times and to different people, so in a multilingual database, for instance, users see something meaningful to them in their own language.

@Trim(@Left(@Explode(“Phrase One|1;Second Phrase|2;Value Number Three|3”;“;”);FieldName + “|”))

Subject: Didn’t you mean to type

@Trim(@Left(@Explode(“Phrase One|1;Second Phrase|2;Value Number Three|3”;“;”); “|” + FieldName))

Subject: RE: Didn’t you mean to type

I wanted to leave a little mystery, I guess. Or I was distracted. Or on drugs. Or something.

The moral of this story is: never take anyone’s off-the-cuff code at face value.

Subject: Now you’re shattering my illusions

And here I thought that all code in this forum came with a cast-iron guarantee and a lifetime of free maintenance!