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
lodoss1118lodoss1118 

Remove trailing zeros from string in formula field

How would i remove trailing zeroes (left after the first numeric char) for this 'LON00010'

Steve :-/Steve :-/

I think you need to use FIND and SUBSTITUTE functions 

 

https://na2.salesforce.com/help/doc/en/salesforce_formulas_cheatsheet.pdf 

 

There's an example of the SUBSTITUTE function on Page 83 here ->

 

https://na1.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf

regger118regger118

Not sure if this help though for example find only finds the first match not the last one, not sure how to do this?

DevilSheetuDevilSheetu

Hey,

 

Not excatly trailing but below code will replace all the spaces from your string:

 

strName.replace(' ','');