[SalesForce] Workflow Field Update formula function TEXT() using picklist API values, not label values

I have custom picklist field (Alpha_Type__c) with the following sorts of values:

Option:

A B C – XY the api name for this is: a_b_c_x_y

A B C D the api name for this is: a_b_c_d

A B C \ DEthe api name for this is: a_b_c_d_e

Anyway I use this field in workflow rule to update another field. The formula is simple enough:

RecordType.Name + " Request - " + TEXT(Alpha_Type__c )

Whenever it runs it always uses the Picklist API name in the field update presenting the result as:

Volunteers Request - a_b_c_x_y

When in reality I want it to display the value as:

Volunteers Request - A B C - XY

Has anyone come across this before? I've read the picklist API names were released in Spring 2017 so could it be a bug?

Thanks

EDIT with some images, apologies these relate to vandalism on green spaces – I didn't want to go into detail above but I can't avoid it with it screenshots….first the picklist:
Picklist Image

And now the formula in the Field Update:
Formula

And finally the end result, subject field populated by the formula via a workflow rule:
subject

I have tried using new values in the picklist and I have tried a different picklist field and again the formula displayed the api name (It is perhaps more noticeable now the api names have underscores etc – in the past (and presumably after the upgrade they value reflected the api name identically…)

Best Answer

So I have found a workaround...with help from Salesforce:

  • Under "Data Management" -> "Picklist Settings" enable the sole setting of "Disable editing picklist values' API names"
  • Go to your picklist field and delete the entry
  • Add the value back into the picklist

By default the API Name is an exact copy of the Value, it includes spaces, special characters etc.

By enabling the first setting I can avoid encountering this problem by stopping the developers playing with the API names...

Related Topic