5 Replies Latest reply on Jan 5, 2018 11:24 AM by Jamie Cannon

    html code showing up in note summary

    dunnsu Apprentice

      I have a calculation that will display a summary of all of the notes in a ticket.  However, that summary displays with all of the associated HTML code when I pull a report.  In the ticket itself it is readable, but not when I try to pull it into a report.  How can I format this to be readable in a report?


      Here's the calculation:

      import System

      static def GetAttributeValue(Incident):

               SortedNotes = List(Incident.Notes as Collections.IEnumerable)

               SortedNotes.Sort() do (first, last):

                             return last.CreationDate.CompareTo(first.CreationDate)


               Value = "Note Summary: "

               for Note in SortedNotes:

                          Value += String.Format("\r\n<BR /> Note {0} added by {1} on {2}:<BR />\r {3}\n<BR /> ", Note.SerialNumber, Note.RaiseUser.Title, Note.CreationDate, Note.Text)

               return Value


      Here's the output of a sample ticket: