Clarity Service Management

Expand all | Collapse all

Stored Query for Scoreboard

Jump to Best Answer
  • 1.  Stored Query for Scoreboard

    Posted 03-02-2018 04:18 PM

    Trying to create stored query for scoreboard and getting the following error (where clause results in a Cartesian product) or not showing accurate results.

     

    I have a manager who is asking for the following list of calls to show in a folder on the manager scoreboard queue:

    • category = Self-Service Other and Status = Open 
    • OR
    • category = Self-Service Other and Priority IS NULL
    • OR
    • group = IT Store Calls and Status = Open
    • OR
    • group = IT Store Calls and Priority IS NULL

     

    I have tried the following queries but neither are giving correct results as it is showing tickets with other statuses and not just Open as well as not showing any tickets with the category of Self-Service Other.

     

    Query 1

    active=1 AND ((status = \'OP\') OR (priority = 0)) AND ((category = \'Self-Service Other\') OR (group.last_name IN \'IT Store Calls\'))

     

    Query 2

    (active=1 AND (category = \'Self-Service Other\') AND ((status = \'OP\') OR (priority = 0))) OR (active=1 AND (group.last_name IN \'IT Store Calls\') AND ((status = \'OP\') OR (priority = 0)))

     

     

    Any help on how to adjust this query to show the correct results would be appreciated.

     

     

    Katherine Hainley



  • 2.  Re: Stored Query for Scoreboard
    Best Answer

    Posted 03-05-2018 03:25 AM

    Hi Katherine,

    please give the following query a try :

     

    active = 1 and ((category.sym in (\'Self-Service Other\') and ( status=\'OP\' or priority is null )) or ( group.last_name in(\'IT Store Calls\') and ( status=\'OP\' or priority is null)))

     

    or more readable:

    active = 1 and
    (
    (
      category.sym in ('Self-Service Other') and
      (
       status='OP' or priority is null
      )
    )  
    or
    (
      group.last_name in('IT STore Calls') and
      (
       status='OP' or priority is null)
      )
    )
    )

     

    Hope that helps

    Kind regards

    ......Michael



  • 3.  Re: Stored Query for Scoreboard

    Posted 03-05-2018 12:46 PM

    This worked perfectly ... thank you so much for the help.

     

     

    Katherine