- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 04:12 AM
Hi Everyone
I want to know basic thing. How to break line in setValue .
g_form.setValue('comments', exp_id
+',' + model_name
+ ','+ desc );
I want break and display like : exp_id
model_name
desc
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 04:16 AM
Hello,
Try below code
g_form.setValue('comments', exp_id + '\n' + model_name + '\n'+ desc );
\n will add new line in string.
Thank you,
Ali

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 04:16 AM
Hello,
Try below code
g_form.setValue('comments', exp_id + '\n' + model_name + '\n'+ desc );
\n will add new line in string.
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 08:18 AM
Hello Ahmmed,
Could you please guide on how to add a newline within a text? Specifically for a field message? Apparently when I am using \n system is still not recognizing the newline within the message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 06:00 AM
Point mentioned by Ahmmed should work fine.
Please try that and share the updates.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader