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
Lorenzo WilsonLorenzo Wilson 

Formula to Picklist (left of semicolon)

I've a picklist with the values like the below, I want the number part to show, so for example, BA, I want my field to just show 10001:-

10001: BA
10002: Virgin

Any thoughts? My List is 3000, so cannnot use dependent/workflow rule!
Best Answer chosen by Lorenzo Wilson
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi Lorenzo,
Try this formula.I tried this in my org,its working fine.
I used Formula field with return type text.If you want retun type of number use value to convert text to number
TRIM(LEFT(TEXT( newpicklist__c ),FIND(": ", TEXT( newpicklist__c))-1))

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards

All Answers

Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi Lorenzo,
Try this formula.I tried this in my org,its working fine.
I used Formula field with return type text.If you want retun type of number use value to convert text to number
TRIM(LEFT(TEXT( newpicklist__c ),FIND(": ", TEXT( newpicklist__c))-1))

Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.

Thanks and Regards
This was selected as the best answer
Lorenzo WilsonLorenzo Wilson
Great, that is indeed working. Thank you