Copy attachment contents into a KB field

When a user searches for a knowledge base article from an incident, problem, or change request, the displayed article includes an Attach to Task button at the top right.

About this task

The word task is replaced by the name of the form where the search was initiated.

When you click this button, the article number and contents are copied into the Comments or Description field of the incident or problem record by default. Administrators can control the field where this information is placed.

Controlling the Attach to Task button

Administrators can customize the copying behavior with a property.

Procedure

  1. Navigate to Knowledge Base > Properties.
  2. In the Other Knowledge Properties section, locate When attaching an article to an incident, copy the content into this field:
    KB attach
  3. Specify a field into which to copy knowledge article content. This must be the Element name for the field, which is found by right-clicking the field name and selecting Configure Label.

    By default, this property is set to comment, meaning that content will be copied into the Additional comments field. If you change the value to work_notes, the article content would be copied into the Work notes field.

    The copy behavior is based on the data type of the destination field. If the destination field is a reference field to kb_knowledge, ServiceNow creates a reference link to the existing article rather than copying the article contents into the record.

    Notes/Limitations
    • The target field must be on the form to receive the data.
    • You can (optionally) specify more than one target field, separated by commas. In this case, ServiceNow looks for each field in order and copies the contents into the first one it finds on the form. It does not copy the data into multiple fields.
    • If the selected field does not exist on the form, ServiceNow checks for Comments and Description automatically.