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
MiddhaMiddha 

New line character in default value of Text area field

Hi,

I am trying ot create a new Long text area field with some default value which should look like:

1. This is line One.
2. This is line Two.

Can anyone tell, how do i set the above text in the default section of the field as the section does not accept new line charachters. I am only able to set the text as:

"1. This is line One. 2. This is line Two."

I also tried using a formula function BR(), <BR>, \n\r, \r. But none of them works. Can anyone helpout with the correct syntax?

Thanks in advance.

mousetrapmousetrap

Can we see an example of the code as it currently stands?

mousetrap

MiddhaMiddha
The default value which i have currently placed in the field is:

"1. This is line One. 2. This is line Two."

But i want it to be :

"1. This is line One.
2. This is line Two."

which is not accepted by the formula section.

SFDummySFDummy

I need to do the same as described in post.  how can I add new line in the string when using in a formula

SFDummySFDummy

For those still looking for solution

 

"1. This is line One." + BR() + " 2. This is line Two."

dmchengdmcheng

This works OK if you just want to display the results, but if you have to export the formula field or do a mail merge, then the value appears as "This is line 1 <BR> This is line 2."  We really need a true newline function and I don't think there's a workaround for the lack of newline.

 

David

OyeCodeOyeCode

Try

 

"abc" & BR() & "xyz" this is correct formula for line break in long text area field

 

 

 

Praveen KimarPraveen Kimar

Use "\r\n" instead of "\n" and BR(). It will work..

Mitesh SuraMitesh Sura
nothing seems to work in for custom formula field. It displays the char as is. I am not trying to display the field in VF page. The formula field in on standard UI.