function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Scenic SunriseScenic Sunrise 

How do I grab the selected Picklist value of a field to paste to a text field?

Let's say I have a field called "purple" with picklist choices a,b,c
 
If I have an Account record with a "b" value in the purple field, how do I capture that to paste to a regular text field (called yellow)?
 
I've seen it suggested that the CASE function can be used.  As an example, I've tried setting up an Account custom formula field (called yellow) that returns text with the following formula:
 
CASE (purple_c,
"Picklistvalue1","a",
"Picklistvalue2","b",
"Picklistvalue3","c",
"blank")
 
I was hoping that if I opened the Account record, or edited it, that the "yellow" field would obtain the text value from the "purple" picklist.  It isn't working.  What am I doing wrong, or should I be trying do something else altogether?
Scenic SunriseScenic Sunrise

I actually figured out how to it myself after I posted. In case anyone has a similar issue, the formula for this case:

CASE (purple_c,
"a","a",
"b","b",
"c","c",
"blank"
 
In my case, I am actually grabbing the "purple" field's picklist selection in the Account screen and copying the value selected by the user to a field in the Opportunity screen called "yellow".  This CASE function worked in the field update, and the workflow rule routine on specified conditions then makes it happen.