The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Appending text on a String field

Wayne Richmond
Tera Guru

When an email is received by Service Now, I want the reply to append an existing string field so the text goes at the top (there may be text in there already). This needs to be a string field so I can reference it from the Email Client pop-up. Any thoughts how I can append the text rather than overwriting it?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

If I understand this directly you're wanting to add text to a string field on the target record rather than overwriting it. You can do:



current.u_text += '\n' + email.body_text;


or


current.u_text = current.u_text + '\n' + email.body_text;



Let me know if I've misunderstood your question.


View solution in original post

1 REPLY 1

Brad Tilton
ServiceNow Employee
ServiceNow Employee

If I understand this directly you're wanting to add text to a string field on the target record rather than overwriting it. You can do:



current.u_text += '\n' + email.body_text;


or


current.u_text = current.u_text + '\n' + email.body_text;



Let me know if I've misunderstood your question.