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
AbAb 

Formula field to have only first two digits of text field

Hello,

I have a text field which has postal code.
I want to create another text field with only first two digits of the postal code.

I want to use this field to group in Reports.

Will i be able to group in report witha formula field.
Best Answer chosen by Ab
William TranWilliam Tran
Use this function in your formula:

LEFT(text, num_chars) 

so LEFT(TEXTFIELD__c, 2)

thx

All Answers

William TranWilliam Tran
Use this function in your formula:

LEFT(text, num_chars) 

so LEFT(TEXTFIELD__c, 2)

thx
This was selected as the best answer
AbAb
If i add formular field, will it calculate for okder fields as well ?
William TranWilliam Tran
Formula fields are instant, they will change to reflect current data.

Formula fields update themselves, they don't update other fields.

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
David Roberts 4David Roberts 4
see https://trailblazers.salesforce.com/answers?id=90630000000hT1oAAE