Example: Adding a Template to a Memo Field

You can use workflow scripts to add a default template to a memo field. This example adds text to a memo field called Business Case to display the following template:

Perform this customization by placing the HTML code for the text into the BG_USER_25 field when a defect is added. This example assumes that the user-defined field BG_USER_25 stores a business case string.

Add the code to the Bug_New event procedure, which is triggered when a user adds a new defect.

Sub Bug_New
        On Error Resume Next
        Bug_Fields("BG_USER_25").value = _
        "<html><body><b>Step by step scenario:</b>" & _
        "<br><br><br><b>How it affects the user:</b></body></html>"
        PrintError "Bug_New"
        On Error GoTo 0
End Sub