Display shorter enum value labels in overview

In a form we use an enumeration with pretty long, verbose value labels (in order to explain to the user what the desired input should be).

Now we want to display shorter, more concise value labels in an overview of the same documents.

We’ve researched different options:

A) Computation of a “parallel” enum

We’ve created another enumeration field, with exactly the same values as the enumeration for user input, but with different labels.

EnumUserInput
* value A, label "Option A with extremely long label good for user input, but bad for concise display in an overview"
* value B ...

EnumOverview
* value A, label "Option A"
* value B ...

We’ve created a computation, which tries to compute the value of EnumOverview from EnumUserInput:

FieldFilled(EnumUserInput) : [EnumUserInput]

However, this fails with the following error in SME:

When comparing enumerations, the enumeration values must match (for ‘A’, the values ‘Option A with extremely long label good for user input, but bad for concise display in an overview’ and ‘Option A’ are specified). [MVK_INVALID_COMPARE_ENUM_TO_ENUM]

While I do understand, that enum values should be the same when computing one enum value from another enum, I do not quite understand why this applies to enum value labels as well.

Is it possible to configure this to behave otherwise? Is there a way to work around this?

(in my opinion this used to work in earlier A12 versions, e.g. 2019.02)

B) Expressions in overview model
In form model repeats we could use expressions to conditionally change the label depending on the enum value.

For overview models, no such facility exists (yet).

C) Computation of a string field

We could compute a string field, such that the value of the string field contains the desired label and use the string field in the overview. Roughly like this:

[EnumUserInput] == "A" : "Option A"
[EnumUserInput] == "B" : "Option B"

However, this is hard to maintain and breaks i18n, as we are putting labels into document fields.

I would be happy to learn about alternative options. Thanks!

@oliver.buettner fyi

How about using a short label overall and adding hints to the form and adopt the rendering of the form to show the hint more prominently?

Thank you for your suggestion, @andreas-fresh-mesa.

I am not aware of the possibility to add actual hints to enum values. Is there a way to do this with modeling?

We could model dependent controls with text cells (containing the “hints”), which are displayed when an enum value is selected.
However, this would require some remodeling and would also change the experience from a user perspective (who would have to select each option in order to get know details).

You should be able to use the A12 l10n API to render shorter labels for your enumeration values.

For that, you would need to determine the exact key(s) that would be used for those values (take look into e.g. form engine or overview engine documentation).

Then you would need to customize the l10n by either adding additional l10n resources that contain the labels for above mentioned keys or by providing a customized Localizer function that returns the shorter labels whenever those keys are passed into it.