You need to sign in to do that
Don't have an account?
Enth
Formula field stripping multiple spaces
Trying to create a formula field that formats a set of fields for output in a fixed format. e.g.
RPAD(Name, 25) & RPAD(Phone, 20) & RPAD(Fax, 20)
When we view the data output all the spaces are automatically trimmed to a single space (i.e. Bloggs Inc 01299 999999 01299 888888). We changed this to use a custom field populated by a workflow instead. The field displays with the spaces trimmed again but is correct when we Edit the record.
Anyone know how to get the formula field to output correctly ?
This is because HTML automatically suppresses extra blank spaces when it renders the content in a web browser. The only way around that is to wrap the content in <PRE></PRE> tags or replace the spaces with HTML non-breaking space characters, neither of which can be done in a formula field because markup isn't allowed.
You might be able to create a Visualforce page that has something like the following in it (I'll warn you that Visualforce is not my strong suit so you might want to ask around on the Visualforce board):
and then include the Visualforce page as a component in your page layout.