how do you add another line in a text formula
# ask-stanley-ai
r
how do you add another line in a text formula
c
AI generated answer (using internal Slack threads):
To add another line in a text formula in NetSuite, you can use the newline character (
'\n'
). This character is used to insert a new line or carriage return into a text string. For example, if you have two custom fields and you want to display them on separate lines, you can use the following formula:
Copy code
{customfield1} || '\n' || {customfield2}
This formula concatenates the values of
customfield1
and
customfield2
with a newline character in between, causing
customfield2
to appear on a new line when the formula is displayed. If you are trying to add a line break in a saved search formula, you can use the
REPLACE
function to replace commas with line breaks. However, this will only work if the field type is Formula (HTML). Here is an example:
Copy code
REPLACE(NS_CONCAT({item.name} || '-' || {item.description}), ',', '<br/>')
This formula concatenates the item name and description with a dash in between, then replaces any commas in the resulting string with HTML line breaks. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816421747
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812612653
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812518358
Please provide your feedback on this answer.