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
jgoehringjgoehring 

Case statement to set a second field value from a field value

I'm sure that subject line was confusing. Here's what I'm trying to do.

Field #1 name is 'USER' 
Value of field #1 is '100-Bob Jones'

I want to create a second field that just has the first 3 numbers of "100-Bob Jones'

I tried using a case statement to do this but the limit is 1300 characters.

Is there any way to set a value to the first 3 characters of a field?

ex:  left(3,USER)

First three characters of the user Field.

??

Thanks
MSheridanMSheridan
You are exactly right in using the left function and pretty much answered your own question:smileyvery-happy: You would use:
 
LEFT( USER__c , 3)
jgoehringjgoehring
Is there an issue with doing this on the same object . (i.e. both fields are on the lead object)
MSheridanMSheridan

No I don't believe so. Actually when you are writing a formulas the fields you are using need to be on the same object. S-Controls can pull in info from fields on different objects.

jgoehringjgoehring
Unfortunately, I'm realizing that this can't be done with a Lookup field (as it returns some weird value and not the value I need)