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
Collaborative eCollaborative e 

Add default text to Long Text Area field with line breaks

I am attempting to add default text to a long text area field that is broken up into sections (paragraphs). I've tried using the BR() function but it doesn't render as a break in a a default value function. Any ideas?

forecast_is_cloudyforecast_is_cloudy

Use this formula in the 'Default value" of the Long Text field and you should get a line break between the text 'abc' and 'xyz'.

 

"abc" & BR() & "xyz"

Collaborative eCollaborative e

I tried that @forecast but it came back with the following result in edit mode:

 

abc_BR_ENCODED_xyz

thomastthomast

Using forecast's structure, with separate quote-delimited strings concatenated to the BR() function, I get the expected result. of the text on different lines.  Can you paste the formula you tried that gave you the undesired result?

 

forecast_is_cloudyforecast_is_cloudy

Ditto to @thomast. I tested the formula that I had posted in a Developer Org and it got the desired result. Can you please retest Collaborative E and confirm?

Pradeep_NavatarPradeep_Navatar

"abc" & BR() & "xyz" this is correct formula for line break in long text area field. I have tested this and find it working fine.

Srikanth K 99Srikanth K 99
Hi Pradeep_Navatar

"abc" & BR() & "xyz"  with this in the salesforce field it will show with line breaks which is fine , when i used the same field in the visualforce page it is not showing the way you told
 
Maria WallaceMaria Wallace
Why does this not work for me?  I have a long text area and I'm trying to insert line breaks.  Here's what I have:
“Location – NASA” & BR()& 
“Partner Name – Transform” & BR()& 
“Product - Transform Foundation Server Deployment” & BR()& 
“Then click on License Options” & BR() & 
“Do not update the following generator fields: Issue Date, Max. Concurrent Formscape Designers, Max. Runtime Servers, All Type fields, and Enterprise License.” & BR() & 
“Unused generator fields are not included in layout. Please skip them."
It's not putting in line breaks.  It's showing all the "code" with a run-on paragraph.  What am I doing wrong?
Maria WallaceMaria Wallace
Just to be clear, this is in the Default Value field of a Long Text Area.