Skip navigation
606 Views 2 Replies Latest reply: Mar 28, 2012 3:42 AM by Leanne RSS
Leanne Apprentice 14 posts since
Feb 11, 2009

Has received 1 of 9 achievements.
Currently Being Moderated

Mar 27, 2012 8:13 AM

Grouped queries not displaying correctly in WebDesk - calculation?

We are trying to publish a change schedule on WebDesk, so that all of the analysts can see changes which are scheduled, grouped by week.

 

However, we have come across a limitation (confirmed by LANDesk) whereby grouped queries in WebAccess DO work, but not if the grouping is based on a range.

 

Basically, we have created a query in Console, which shows changes in the past 7 days and in the next 6 weeks - to displayed grouped by week. This displays fine in Console, and returns the desired results - whereby you can expand the week to view relevant changes:

image001.png

However, when you add this query to a dashboard in WebDesk, it doesn't group the items - it lists them separately, which is far from ideal:

 

image003.png

 

We have even tried creating a dashboard in Console and publishing it to WebDesk - but it doesn't solve the issue.

 

It has been suggested that we could perhaps use a calculation to sort the attribute by (calculation based on string attribute) - is there anyone who can provide any detail or information on how we can achieve this, as we are very new to calculations?  There is a field on the Change window called Target Implementation Date (in date format) which we want to sort and group the results by.

 

Thanks in advance!

  • Jenny.Lardh SupportEmployee 67 posts since
    Nov 11, 2008

    Has received 3 of 9 achievements.

    Hi Leanne,

     

    There is no feature to have queries grouping by other than the raw attribute in Web Desk.

    You cannot have a range of the Creation Date like you can in console.

     

    However, this can still be achieved with some design changes and use of a Calculation.

    If you create a string(100char) Attribute on the Incident Object and create a 'Before Read' Calculation to show the Week and Year you can then set your Query to Group by this attribute instead of the Creation Date and with this get the weekly grouping that you want.

     

    If you have already existing Incidents that you want included in this, you will need to create the Calculation, make sure that it's working and then run a scheduled calculation to set the value on all OPEN Incidents.

    (Please note that you will not be able to run the scheduled calculation on any Closed Incidents)

     

     

    The Calculation that you would need to use would be as follows:

     

    ---

    import System

    static def GetAttributeValue(Process):

    Cal = System.Globalization.GregorianCalendar()

    Date = Process.CreationDate

    Week = Cal.GetWeekOfYear(Date, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Monday)

    Value = String.Format(" Week ", Date.Year, Week)

    return Value

    ---

     

    You will need to set a dependency on "Creation Date".

     

    Kind Regards,

    Jenny

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software