Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

example text in field

Juhi Chawla2
Tera Contributor

Hi All, 

 

In a field I want to display a example text one after other with numbers.How can I display . This field is multiple line text field . But the text is coming next to another even if I am trying to add space , after certain space it stops and it becomes like below . 

find_real_file.png

 

find_real_file.png

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

When using the Example text field on a variable, you cannot add new lines.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

3 REPLIES 3

Appli
Mega Sage

Hi Juhi

May you please try to set the length of the String field as 4000?

Example from Incident' description multi-line field:

find_real_file.png

Hope it helps

Hope it helps

Mark Roethof
Tera Patron
Tera Patron

Hi there,

When using the Example text field on a variable, you cannot add new lines.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Community Alums
Not applicable

g_form.getField() isn't really supported but it works.

Create a new Catalog Client Script and set the example text there.

function onLoad() {
	// Example text does not allow new lines.  Set it here instead.
	var portalField = g_form.getField("project_goals_expected_outcomes");
	portalField.placeholder = "Line 1\nLine 2\nLine 3";
}

example text.jpeg