8 Replies Latest reply on Apr 13, 2011 9:03 AM by JMG

    Add note on the incident window

    Rookie

      Hi Guys

       

      At the User group in Leeds one of the many tips provided was the ability to place the latest note directly onto the incident window, the guys did say that it was recorded on the user community already.

       

      Any chance you can let me have the number or link?

       

      Thanks in advance

        • 1. Re: Add note on the incident window
          Expert

          Hi,

           

          Not seen an article.

           

          You could probably do all this via a calculation.  Add a read only text or HTML field to your window with an "After Read" calculation returning the relevant values from the latest in your Notes collction.

           

          I'm not at my desk so can't post an example.  Happy to do so if it helps.

           

          Though I suspect someone will have a better solution in the meantime...

           

          Cheers - Adam.

          • 2. Re: Add note on the incident window
            karenpeacock SupportEmployee

            Hi

             

            I've attached an extract from the LANDesk days slides which covers what you've asked for.  The community article was for the design topic covered afterwards which was another way to automatically update values.  Stu was the one who produced this good stuff.

             

            Best wishes

            Karen

            • 3. Re: Add note on the incident window
              Rookie

              Thanks Karen

               

              Used this and some of the suggested hints for adding the resolution text info, really useful info.

               

              However this is the current state of play with the add note attribute. Any ideas guys? 

               

              Last Note text.jpg

              • 4. Re: Add note on the incident window
                karenpeacock SupportEmployee

                Hi

                 

                Looks like there was an error on the slide sorry.  I think the first step should read:

                 

                 

                1. Create the attribute
                ›Name it ”LatestAnalystNote“.
                Thanks
                Karen
                • 5. Re: Add note on the incident window
                  Stu McNeill Employee

                  Hi John,

                   

                  I can't quite read the calculation formula from your screenshot to see if I can spot any errors in the syntax, however here is a copy and paste of the formula from the system we used in the demo you saw:

                   

                  import System
                  static def GetAttributeValue(Incident):
                    LatestAnalystNote = null
                    for Note in Incident.Notes:
                      if LatestAnalystNote == null or LatestAnalystNote.CreationDate < Note.CreationDate:
                        if Note.RaiseUser.UserType.Name == 'Analyst':
                          LatestAnalystNote = Note
                    return LatestAnalystNote.Text
                  
                  

                   

                  Thanks

                  • 6. Re: Add note on the incident window
                    Rookie

                    Thanks Stu,  yes thats the text we are using but still no joy even with the change that Karen has suggested

                    • 7. Re: Add note on the incident window
                      Stu McNeill Employee

                      Hi John,

                       

                      I've had another closer look at your formula from your screenshot (TIL you can right-click on an image in community and "open link in new tab" to see it full size!) and it looks like you're missing a space at the start of the last line.

                       

                      The number of spaces before "  return LatestAnalystNote.Text" should match the number of spaces before "  LatestAnalystNote == null".  From the screenshot it looks like you have two spaces before the first line but only one space before the last.

                      • 8. Re: Add note on the incident window
                        Rookie

                          Thats the one Stu, works now.

                         

                        Thanks for your help on this one guys