Calculated properties: add label() and trim() for working with dropdown values

Status: Idea Submitted

Calculated properties can only read a dropdown option’s internal value, never its
label, and there is no function to bridge the gap. There is also no way to trim
whitespace from a value inside a formula. Together these turn a simple naming rule
into a dead end.

In our portal, 49 of 181 dropdown options have an internal value that differs from
the label. A user sees “Suporte aos equipamentos” on the record, while every formula
using that field writes “Suporte e Infraestrutura”. That is roughly 30% of our
150,000 tickets carrying a generated name nobody recognizes. On top of that, about a
third of the values in two of those properties are stored with a leading space,
written that way by an integration, which produces a double space everywhere they
are concatenated.

Neither workaround holds. Translating option by option inside the formula would take
43,000 characters and far more than the 70 nested parentheses allowed. Renaming
internal values to match labels breaks every workflow, list, report and integration
filtering on the old value, and still requires rewriting the stored value on tens of
thousands of records.

What we are asking for:

  1. A label() function that returns the visible label of a dropdown option.
  2. A trim() function. The language already has lowercase, uppercase and
    string_length, so string handling is clearly in scope.

Labels exist to be read by people. When automation cannot reach them, the choice is
either showing text nobody recognizes or taking on a data migration project.