Content in Description of Known Error is not maintaining its format

BibhuRanjaM
Tera Contributor

Dear Community member,

 

I have observed, while creating a known error and filling description part with paragraphs and bullet points, but when I save the data and view it in article format, the formatting changes to one paragraph. Can you please guide what can be done to avoid this issue?

 

In article format:

BibhuRanjaM_0-1738815959857.png

Article view:

BibhuRanjaM_1-1738816020993.png

 

 

 

2 REPLIES 2

Jeroen Lutgend1
Tera Contributor

@BibhuRanjaM Any luck on finding a solutuion?

MaxMixali
Giga Guru

This issue occurs because the “Description” field in the Known Error record is a plain text field, while the Knowledge Article view expects or renders HTML or rich text. When you save multiline or formatted text (like bullet points or line breaks) into a plain text field, ServiceNow strips or normalizes it into a single paragraph.

 

Here’s how to fix or work around it depending on your configuration:

 


 

 

1. Confirm Field Type

 

 

  • Go to System Definition → Tables, open your Known Error table (e.g., problem_known_error or custom extension).

  • Check the dictionary entry for the Description field.

     

    • If the Type is String (255) or String (4000) → it only supports plain text.

    • You need to change it to HTML (html) to preserve formatting and bullet points.

     

 

 


 

 

2. Change the Field to Rich Text (if allowed)

 

 

  • In the dictionary entry for description:

     

    • Change TypeHTML

    • Add a Dictionary Attribute: html=true

     

  • Save and reload the form. The field will now display a rich text editor (RTE).

  • You can format text (bold, bullets, paragraphs) and it will persist in the Knowledge view.

 

 

⚠️ Caution: Changing a field type affects data model and existing integrations. If you can’t modify the OOB field, create a new custom field instead (e.g., u_detailed_description).

 


 

 

3. Alternative: Use a Rich Text Editor Variable

 

 

If the Description must remain plain text:

 

  • Add a UI Policy or UI Macro that uses an RTE variable to capture formatted content.

  • Store that content in a separate HTML field (e.g., u_description_html) and render that in the article template.

 

 


 

 

4. Adjust Knowledge Article Template

 

 

If the Known Error is published as a Knowledge article:

 

  • Go to Knowledge → Article Templates and open the template used for Known Errors.

  • Modify the field reference to use the HTML field:

${u_description_html}

 

 

  • instead of ${description}.

  • If you must keep using ${description}, wrap it with <pre> or <div style="white-space: pre-wrap;"> tags in the template:

<div style="white-space: pre-wrap;">${description}</div>

 

 

TL;DR

 

 

Your Description field is plain text, so formatting is stripped.

Solutions:

 

  • Best: Change the field to HTML (rich text).

  • 🧩 Or: Add <div style="white-space: pre-wrap;">${description}</div> to the Knowledge template.

  • 💡 Optional: Store formatted content in a custom HTML field.