How to Retain the New line / Carriage returns when Pulling Data from Custom Table via UI Macro/Jelly code

Chris Armstron2
Giga Expert

Hi,

I am needing to know how to retain the new lines / carriage returns that are stored in a custom table-

The issue at hand-

When I enter notes into a Journal field, the data is kicked out with the new lines / carriage returns, removed:

Before:

After:

What is happening behind the scenes--

There is a Before Insert and Update Business Rule that is sending the data/text to a custom table called:  u_jh_encrypted_journal.  Here is the Business Rule script:

Here is how the data is displayed within the custom table (it has the new lines / carriage returns):

But in the same breath, when I show xml for the above, the text is flattened out:

In order to repopulate the data under the Journal field, we are using a Macro to pull the data from the 'u_jh_encrypted_journal' table.  Here is the Macro code:

But unfortunately, the Macro is not retaining the new lines.

How would I go about modifying the code to ensure that the new lines are kept?  I've tried getValue and getDisplayValue and both return the same (i.e. new lines removed).

Maybe there is a jelly method to get the form value like within client side scripts 'g_form'?

Thanks,

Chris A.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

The thing to note is that journal fields are not formatted text. how about turning your custom u_jh_notes in to an HTML field, then cc the content in to work_notes and your custom table?

View solution in original post

9 REPLIES 9

Chuck Tomasi
Tera Patron

The thing to note is that journal fields are not formatted text. how about turning your custom u_jh_notes in to an HTML field, then cc the content in to work_notes and your custom table?

Thanks for the quick reply Chuck! When you say 'cc', do you mean custom code?

Sorry for the confusion. Yes, Cc (carbon copy) is a term used in mail and email to copy someone else. You would need a business rule similar to what you have to copy the content of one field to another.

No worries at all. Carbon copy was the first thing that came to mind, but then I was like, naw, that's not what he meant 😉

I will go ahead and give the HTML field type a try and report back.  Thanks for the suggestion sir!