2 Replies Latest reply on Jul 27, 2015 12:42 PM by SBW

    I need Query help.....




      I need a query that shows all tickets (open, closed, doesn't matter) between a certain date range AND from those tickets: created after 5:00pm. (So all tickets created after 5pm within a certain date range)  I have been attempting to do this in the Service Desk console but just not happening there.  I can create the query from scratch in management studio but to find the tables I need and creating the query from that is also cumbersome.  Any help on this would be incredibly and greatly appreciated.




        • 1. Re: I need Query help.....
          Jamie Cannon ITSMMVPGroup

          The issue you are going to have is the After 5:00pm part.  There isn't a query function to specify a specific time to look after.  You might need to capture the time in a calculated field for all your tickets and use that field as your other criteria field.  Just a thought.

          • 2. Re: I need Query help.....

            Alex, you'd need a calculated attribute probably to handle this.


            I'd create something called 'After 5?'


            import System


            Value = false

            if Incident.CreationDate.Hour > 16:

              Value = true


            Then you can create a query on tickets where that is true.  This is using the Incident object but you could put this on Process if you needed to.

            1 of 1 people found this helpful