- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 05:48 AM
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 06:21 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 09:04 AM
Hi Chuck,
The usage of the HTML field definitely works, but it does throw a wrench into another process which I discovered during testing just now. And if I need to open up a new post, I most definitely will.
We have a SOAP integration built out that leverages business rules to update and insert data, from the incidents, to a DB Table on our side. It appears that adding the HTML field produces the following output in our database table:
Would you know of a method to remove the html attributes from the text when being sent over to our side?
I am going to start researching this now, but figured I would ask you first 🙂
I suspect I could use regex for pattern matching to remove/replace the html attributes, but maybe there is a better method.
Thanks,
Chris A.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 09:25 AM
You can use RegEx to remove HTML from a string quite easily. Here's a line of code I use for a personal project where I download HTML and strip out the HTML tags.
var noHTML = rawText.replace(/<[^>]*>/g, '');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 09:47 AM
Cool. I'll give regex a go and report back.
Was just thinking that maybe there was another built in function similar to 'setStringParameter();' in order to remove HTML from being sent over.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2019 12:39 PM
That worked like a charm! Thank you so much Chuck!