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
Carolyn juliana 7Carolyn juliana 7 

How to create a truncated version of field for 255 characters

Hi Gurus,

Our BI team can't pull in our description field from Cases because it's too long.   and we need to created a truncated version of this field for 255 characters

my question is what's the best way to do this?  on existing data and new data

Regards,
carolyn
Best Answer chosen by Carolyn juliana 7
AbhishekAbhishek (Salesforce Developers) 
Hi,

Try the below and The formula will be

LEFT(Long_Text_Field__c, 200)

but please note the above formula will not work if you are creating this is a custom formula field as long text fields are not supported directly in a custom formula field

You will need to create a workflow on the object and have a field update action, that will update the text field with the first 200 characters from the long text field and then use the above formula as the formula for your field update.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.

All Answers

AbhishekAbhishek (Salesforce Developers) 
Hi,

Try the below and The formula will be

LEFT(Long_Text_Field__c, 200)

but please note the above formula will not work if you are creating this is a custom formula field as long text fields are not supported directly in a custom formula field

You will need to create a workflow on the object and have a field update action, that will update the text field with the first 200 characters from the long text field and then use the above formula as the formula for your field update.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.
This was selected as the best answer
Carolyn juliana 7Carolyn juliana 7
Hi Abhishek,

I got error as 
Error: Field Long_Text_Field__c does not exist. Check spelling.

 
AbhishekAbhishek (Salesforce Developers) 
Carolyn the above is just an example You might have to change based on your Org.

And I suspect Long_Text_Field__c field is not present in your Org.
Carolyn juliana 7Carolyn juliana 7
You are right :) Ok, i've tested and works when updating a Case to populate this new 255 char field.   also what about historical data?Any thoughts?