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
Brian NaiduBrian Naidu 

How to I display the last 6 digits of a 15 digit number? (without removing the other digits)

Hello, 
I'm new to Salesforce. In our assest records we have part numbers that range from 15-25 digits. These numbers are entered into fields in SF for documentation. The last 6 digits of the 15-25 number is the actual serial number of the part, the rest is manufacturing codes. I would like the field to display the last 6 digital, but if a user click (or double clicks) the field it shows the full lenght number. 

If you have a solution that would be great and how to create it. I inherited the Saleforce and trying to figure it all out. 

Thanks for any help! 
Brian
 
Best Answer chosen by Brian Naidu
UC InnovationUC Innovation
Hi Brian,

One thing you could do is create a text formula field to display the last 6 digits of that field. This way you will have 2 fields, one showing the serial number and another showing the entire number including the manufacturing codes.
 
Right(name_of_your_field__c, 6)

Where name_of_your_field__c is the name of your 15-25 digit field.

Hope that helps!

All Answers

UC InnovationUC Innovation
Hi Brian,

One thing you could do is create a text formula field to display the last 6 digits of that field. This way you will have 2 fields, one showing the serial number and another showing the entire number including the manufacturing codes.
 
Right(name_of_your_field__c, 6)

Where name_of_your_field__c is the name of your 15-25 digit field.

Hope that helps!
This was selected as the best answer
Brian NaiduBrian Naidu
Thank you. I will give it a short. Would this be a field update with a rule? 
UC InnovationUC Innovation
This would be a new field of type formula. Create a new field and select formula as the type, and text as the formula type.
Brian NaiduBrian Naidu
Thank you very much. It worked.