6 Replies Latest reply: Mar 26, 2014 8:14 AM by Jamie Cannon RSS

    Option to Hide Notes from Users

    Adam Wilden Expert

      Hi,

       

      We have been asked for the ability to hide certain Notes from the User.  Not very ITIL I know, but we want to hide some internal communications about calls, e.g. if a customer asks for a doubling of email quota we want to be able to discuss via LANDesk,  but out of view of the customer.

       

      • We could create a new collection, e.g. "Internal Notes" but this would mean even more complexity to our processes as well as the Notes being in two different places and make it harder to follow.

       

      • Or we could add a boolean on the existing  Notes object called "Display to Customer? (Y/N)".   This is perhaps simplest, but we'd need to change how the default Notes collection displays on Portal.  We'd need to use a new query with the new condition, but there is no obvious ability to replace the default Notes collection with the new query, except via "Show On Window" which doesn't always display well on Portal...

       

      • Perhaps more advanced would be to add a new field to Notes that uses a calculation to copy from the main Notes text on saving, except in those cases where the new boolean says to hide the note, in which case it doesn't copy the text but instead inserts "Internal Communication added".   Then we could change the View that users see so that it shows a modified  Note window showing the new field rather than the original text field.  This would have the advantage of adding a note showing that progress is being made but hiding the actual text.  But not sure if the caluclation can handle that? 

           

                I'm thinking of something like this (I don't know Boo syntax so this is probably wildly out... )

       

                     import System
                     static def GetAttributeValue(Note):
                      Var1 = Note.IsHidden
                      if Var1 == 0:
                      Value = Note.Text
                      else:
                      Value = "This Incident was updated by an internal communication..."
                      return Value

       

                It would be nice if we could also force the "Email Customer" boolean to false in these cases to avoid potential errors (probably asking way too much). something like:  Note._NotisyRaiseUser == 0

       

      These are just a few things we've thought of - but before we make a decision, I'm sure others have been here before so any ideas/advice/comments gratefully accepted as always.

       

      Thanks - Adam.

        • 1. Re: Option to Hide Notes from Users
          Adam Wilden Expert

          Hi Folks,

           

          Nearly there on this one.

           

          We can get it to copy text conditionally to our new text field based on any attributes but boolean.

           

          e.g. the following works fine based on Title which is a string field:

           

          import System

          static def GetAttributeValue(Note):

          Var1 = Note.Title

          if Var1 == "Show":

            Value = Note.Text

            else:

            Value = "This Incident was updated by an internal communication..."

            return Value

           

          But we can't do the same based on our boolean - I think this is because we have the wrong syntax.

           

          We are trying:

           

          import System

          static def GetAttributeValue(Note):

          Var1 = Note.IsHidden

          if Var1 == 0:  (we've also tried "if Var1 == "False":"  etc., here as well)

            Value = Note.Text

            else:

            Value = "This Incident was updated by an internal communication..."

            return Value

           

          Does anyone know the syntax to return and create boolean values?

           

          Many thanks - Adam.

          • 2. Re: Option to Hide Notes from Users
            Adam Wilden Expert

            Hi Folks - got there in the end!  I didn't realise that the boolean (tickbox) attribute values need to be converted to strings before being read.

             

            Here's what we did:

             

            New attributes on the Note Object:

             

            IsHidden = Boolean, shown on Analyst Notes window

            PublicText = String -1, replaces standard "Text" field on a new End User Notes window

            (Use Views to publish the new Note window to End Users).

             

            The following calculation is set on the Note object, Before Save,  on the new  attribute called "PublicText"

             

            import System

            static def GetAttributeValue(Note):

            if Var1 = Note._IsHidden.ToString() != "True":

            Value = Note.Text

            else:

            Value = "This Incident was updated by an internal communication... Please call the Service Desk for further information."

            return Value

             

             

            For analysts, the new tickbox "IsHidden" asks whether to hide the Note text from the End User.

             

            If unticked (or indeed anything but "True") it simply copies the text from the normal text field to the new "PublicText" field.   If ticked however, the calculation copies "This Incident was updated by an internal communication..."  to the new field.  This "PublicText"  field replaces the standard text field on a new Notes window published to End Users.

            This means we still have an internal audit of all that has been said but,  if required, the specific text can be hidden from the customer by analysts ticking the "IsHidden" tickbox before saving a note.  [We wanted this for notes where we aren't certain on facts, are debating acquiescing to a request, or are internally chasing authorisation  etc...]

             

            This is probably basic stuff for many of you but I've copied it in, just in case anyone in teh future is in the position I was a few days ago and might find it useful

            • 3. Re: Option to Hide Notes from Users
              Specialist

              Hi Adam,

               

              I am trying something similar but still have some problems.

               

              Maybe you could give me a hint.

               

              How do you convert the boolean to string?

               

              I am trying something like that

               

              http://community.landesk.com/support/message/68578

               

               

              Thanks

              Thomas

              • 4. Re: Option to Hide Notes from Users
                Adam Wilden Expert

                Hi Thomas,

                 

                Not sure what you mean.

                 

                The example above is working so can be used as an example.

                 

                You only need to use ToString() if checking a boolean for "True" or "False";  to set a boolean value you can simply return true or false.

                 

                For example you could set the following on any boolean attribute:

                 

                import System

                static def GetAttributeValue(Note):

                if  Note._a-boolean-attribute.ToString() == "True":

                  return true

                else:

                  return false

                 

                Cheers - Adam

                • 5. Re: Option to Hide Notes from Users
                  Specialist

                  Hi Adam,

                   

                  thanks for your quick answer.

                   

                  I tried a lot and the example you posted is what I had in mind but I can´t get my fields updated.

                   

                  My calculation type is 'Before save' and in my opinion that means when I open the note note window, the calculation should be executed...

                   

                  But nothing changes when I open the notes window...

                   

                  Do you have an idea what could be wrong?

                   

                  Thanks

                  Thomas

                  • 6. Re: Option to Hide Notes from Users
                    Jamie Cannon ITSMMVPGroup

                    Not sure if you got it yet Thomas, as this is a faily older post, but I think you will have to have a variable on the Notes window to "calculate on change" first.  So if you choose a category for instance, you calculation should then run automatically.