
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2017 11:49 PM
We are trying to show the Close Notes of an incident ticket on the Service Portal and on our widget we can only get the plain text version of the contents of Close Notes from incident table. Is there a way to get the contents of that field with the paragraph lines intact?
HTML
<p>{{data.CloseNotes}}</p>
Server script
data.CloseNotes = $sp.getFields(gr, 'close_notes');
if(data.CloseNotes != '') {
data.CloseNotes = data.CloseNotes[0].display_value;
}
03/27/2018: I tried the solution by shashank13 but it did not show any value at all now:
HTML
<div ng-if="field.value && (field.type != 'decimal' || field.type == 'decimal' && field.value != 0)" class="m-b break-word" ng-repeat="field in data.CloseNotes">
<label class="m-n">{{field.label}}</label>
<div ng-switch-default ng-bind-html="field.display_value">{{field.display_value}}</div>
</div>
Server script
data.CloseNotes = $sp.getFields(gr, 'close_notes');
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 07:27 AM
Hello JC;
Would it be possible to provide a pic of what the text is displaying as and what you want it to display as? Im not sure if your simply trying to preserve the line breaks in the text, which in that case, you may want to wrap <pre>{{data.CloseNotes}</pre> in pre tags like so, or you can utilize the css white-space property with the following name value pair: white-space:pre-wrap. So you could add a class to your p tag like <p class="wrapped">{{data.CloseNotes}</p>, and use the following css rule set:
.wrapped{
white-space:pre-wrap;
}
Im not sure if this is what you are referring to.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 04:01 AM
Any ideas on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 04:12 AM
Please use the below mentioned code in HTML. This code will bind the display value of the field of your table in your widget.
<div ng-switch-default ng-bind-html="field.display_value" ng-if="field.label != 'Short description'">{{field.display_value}}</div>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 04:30 AM
Hi, I tried this but the values displayed as empty, only the label showed up. I have updated my code above for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2018 07:05 AM
Thanks Shashank, This worked for me.