How can I send backslashes within a Manual Notification?

Document ID : KB000027045
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

It has been noted that, whenever a backslash (\) is included within an attribute associated with a Manual Notification, e.g. the Description, the resulting notification as viewed has the backslash removed, e.g:

Notification sent: "Where is the backslash (\)"

Notification viewed: "Where is the backslash ()"

Solution:

Note: The following information and suggested steps relate to variables used within a Manual Notification, i.e. it does NOT affect hard-coded data that will still need to be altered manually

To send a backslash successfuly requires a double backslash to be added in the Manual Notification at the appropriate place.

The problem is that, since variables are already resolved they cannot be changed.

A suggested method to ensure that double-backslashes are added; to be resolved to a single backslash for viewing is as folows:

IMPORTANT: The following is unsupported but is being provided as a convenience to our customers

  1. Launch Web Screen Painter

  2. Select File -> Open, Interface Analyst, form group Default then open nf.htmpl

  3. Click on the source tab and search for the function initNames()

  4. At the end of the function add the following two lines just before the closing brace/curly brackets:

    var regexp =document.main_form.elements["KEEP.msgtxt"].value;

    document.main_form.elements["KEEP.msgtxt"].value = regexp.replace(/\\/g,"\\\\");

    Note: This replaces each backslash (\) in the message body of the Manual Notification with two backslashes (\\) where the backslash forms part of the attribute.

  5. Save the modified nf.htmpl file.

  6. Select File -> Publish in order to use the modified nf.htmpl file.

To return to the original nf.htmpl behavior:

  1. Select File -> Delete from within Web Screen Painter.

  2. Click the nf.htmpl file then delete button.

  3. Finally select File -> Publish to complete the backing out of the change.