Showing Additional Information on the Helpdesk Dashboard
In this article, I will show you how to display the status of other queues besides your assigned queue in the dashboard. Normally, you can only see the status of the queue you are assigned to but there are times when you need to know more. I'll also show you how to limit a view to specific queues (such as showing Queue A's status to Queue B) or to specific workers (such as when a manager is in charge of multiple queues).
The End Result

Step 1 - Create customDashboard.ascx
The first step is to create a place to put our custom template. Create a folder in Program Files\Helpdesk\AeXHD\ called custom and a subfolder called templates. Next copy dashboard.ascx from Program Files\Helpdesk\AeXHD\templates and paste it into our new Program Files\Helpdesk\AeXHD\custom\templates. We may also need to remove the read only property of the file. Right click on the file, go to Properties, and uncheck "Read Only". Once we do this, rename the file from Dashboard.ascx to CustomDashboard.ascx to avoid confusion.
Step 2 - Understanding CustomDashboard.ascx
Now that we have our custom template, lets take a look at the default file to see what makes it tick. There are three major sections in the file. The first is at the top of the file
<asp:Xml id="xmlCustomQueries" Runat="server" Visible="False" EnableViewState="False"> <queries> <query id="open" type="WorkItem" title="sidMyOpenTitle" sql="workitem_status_lookup_id = 300" /> <query id="queued" type="WorkItem" title="sidQueuedTitle" sql="" /> </queries> </asp:Xml>
This xml control contains all of the queries that the dashboard uses. This isn't to be confused with the queries you can create and save in the Helpdesk. The next important piece found in the Sub PrepareTemplate() and is just two lines of code
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "open", title, text, whereClause, reportPeriodClause, currentWorkerClause)
SetHyperLink(hlOpenCount, title, text, whereClause, TryString("sidALLDATES"))
This creates the actual link that we see in the dashboard. In the default template, there are 2 instances of this code, one for the incidents assigned to you, and a second for incidents assigned to your queue. In the code above, "open" refers to the query created in the xml control at the top of the page. The whereClause is the sql in the same query. reportPeriodClause is defined earlier to be ALLDATES and the currentWorkerClause specifics only find incidents assigned to the current worker. The next line calls a sub procedure that creates the hyperlink in the control with the id of hlOpenCount.
The last major part is the link itself which can be found in the layout at the very bottom of the page.
<aw:HyperLink runat="server" id="hlOpenCount" label="sidLblOpen" labelposition="top" command="runQuery" />
Although not much is here, you can see the id is hlOpenCount which was used in the SetHyperLink sub procedure.
Step 3 - Customizing CustomDashboard.ascx
Now that you've seen the file, I'll show you how to enchance it.
Example 1 - displaying a queue to all workers
What we are doing here is showing a single queue's incidents to all workers. First we will create the query.
<query id="NEW_QUERY" type="WorkItem" title="Incidents in the [Queue Name] queue from " sql="workitem_assigned_to_worker_id = XX" /> ID = Name of the query that is referenced later Type = leave as WorkItem Title = this will be displayed when you click on the link, not in the dashboard itself. SQL = the sql "where" clause(s) that you want to use
In this case we want to show all incidents where the assigned worker's id equals XX. Just find the Queue's ID and insert it here. One easy way to find this is to look at the queue list and double click on a queue to view its details. The address will look like this
http://<servername>/AeXHD/worker/Default.aspx?cmd=viewQueue&id=193
The id=193 is the id of the queue in this case. Now that we have the query built, we need to create the hyperlink for it.
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "NEW_QUERY", title, text, whereClause, reportPeriodClause)
SetHyperLink(hlOpenQueueName, title, text, whereClause, TryString("sidALLDATES"))
lblOpenQueueName.text = "Queued [Queue Name]:"
This goes at the very bottom of the sub procedure PrepareTemplate(). If you do not put it at the bottom, you run the risk of calling a variable or DataSet that hasn't been declared yet. Notice that I'm calling the query "NEW_QUERY". It also doesn't have the parameter currentWorkerClause. This is because we don't want to limit the query to only the items assigned to the current worker. As far as the SetHyperLink call, we are setting this hyperlink to the control with id of hlOpenQueueName. That control is created on the final step. We've also added a new label. This will allow for the names of the queues to have text that wraps. Thanks to Dominque for that tip.
<aw:Label runat="server" visible="False" class="clsLabel" id="lblOpenQueueName" /> <aw:HyperLink runat="server" visible="False" id="hlOpenQueueName" command="runQuery" />
Here are our controls. The label contains the text in the style of a label while the hyperlink shows the number. Notice how the hyperlink does not have a label property. This is because the text in label properties of controls cannot wrap but the text property of a label can.
The finished file will look similar to this. I went ahead and changed it to reflect our Tier 1 queue.
<%@ Control Language="vb" inherits="Altiris.Helpdesk.Web.TemplateControl" %>
<%@ Register TagPrefix="aw" Namespace="Altiris.AppWeaver" Assembly="Altiris.AppWeaver" %>
<%@ Import Namespace="Altiris.Helpdesk.Services" %>
<asp:Xml id="xmlCustomQueries" Runat="server" Visible="False" EnableViewState="False">
<queries>
<query id="open"
type="WorkItem"
title="sidMyOpenTitle"
sql="NOT workitem_status_lookup_id in (400, 600)" />
<query id="queued"
type="WorkItem"
title="sidQueuedTitle"
sql="NOT workitem_status_lookup_id in (400, 600)" />
<query id="tier1"
type="WorkItem"
title="Incidents in the [Tier 1] queue from "
sql="workitem_assigned_to_worker_id = 10 and NOT workitem_status_lookup_id in (400, 600)" />
</queries>
</asp:Xml>
<script language="VB" runat="server">
' This method is called by the Template Engine every time the template is loaded.
Public Overrides Sub PrepareTemplate()
Dim title As String
Dim text As String
Dim whereClause As String
Dim count As Integer
Dim reportPeriod As String = "ALLDATES"
Dim dsQueries As Data.DataSet = ListDataSet.GetQueryDefinitions(xmlCustomQueries.Document)
Dim reportPeriodClause As String = " and " & TryString("sidSqlALLDATES")
Dim currentWorkerClause As String = " and workitem_assigned_to_worker_id = $current_worker_id$"
' refresh the configuration if necessary
Altiris.Helpdesk.Services.Configuration.Current.CheckRefresh()
lblTime.Text = Now()
' Find the count of open items assigned to the worker
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "open", title, text, whereClause, reportPeriodClause, currentWorkerClause)
SetHyperLink(hlOpenCount, title, text, whereClause, TryString("sidALLDATES"))
' Find the count of open items assigned to the worker's queue of record (if any)
Dim queue As Integer = CurrentWorker.worker_queue_id
If queue = 0 Then
' queue is prompted
lblQueuedCount.text = ResourceManager.ResolveString("sidLblQueuedNone")
hlQueuedCount.command = ""
Else
Dim workerQueueClause As String = String.Format(" and workitem_assigned_to_worker_id = {0}", queue)
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "queued", title, text, whereClause, workerQueueClause, reportPeriodClause)
SetHyperLink(hlQueuedCount, title, text, whereClause, CurrentWorker.queue_name)
lblQueuedCount.text = ResourceManager.TryString("sidLblQueued", CurrentWorker.queue_name)
End If
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "tier1", title, text, whereClause, reportPeriodClause)
SetHyperLink(hlOpenTier1, title, text, whereClause, TryString("sidALLDATES"))
lblOpenTier1.text = "Queued [Tier 1]:"
End Sub
Private Sub SetHyperLink(ByRef hl As Altiris.AppWeaver.HyperLink, ByVal title As String, ByVal text As String, ByVal whereClause As String, ByVal titleParam As String)
dim t as string = ResolveString(title, titleParam)
hl.Text = TryString("sidItemsCount", text)
hl.Tooltip = t
hl.Params.Add(New Param("title", t))
hl.Params.Add(New Param("where", whereClause))
hl.Params.Add(New Param("viewOne", "yes"))
End Sub
</script>
<aw:Layout id="loCounts" runat="server">
<aw:label runat="server" id="lblTime" Font-Size="xx-small" />
<aw:HyperLink runat="server" id="hlOpenCount" label="sidLblOpen" labelposition="top" command="runQuery" />
<aw:Label runat="server" visible="True" class="clsLabel" id="lblQueuedCount" />
<aw:HyperLink runat="server" id="hlQueuedCount" command="runQuery" />
<aw:Separator runat="server" id="sepQueues" />
<aw:Label runat="server" class="clsLabel" id="lblOpenTier1" />
<aw:HyperLink runat="server" id="hlOpenTier1" command="runQuery" />
</aw:Layout>
Step 4 - Create custom.config
Here we will create the custom.config. This file tells the helpdesk to overwrite the defualt template. Create a text file and rename it to custom.config. Be sure that you can see the file extensions or you might be calling it custom.config.txt. Once you have the file, open it and paste the following.
<?xml version="1.0" encoding="utf-8"?> <custom.configuration> <files path="~/custom/templates/"> <file id="Dashboard" file="CustomDashboard.ascx" /> </files> </custom.configuration>
Save the file and restart IIS. Once it is restarted, go to http://<servername>/aexhd/worker and you'll see our example queue in the dashboard.
This isn't the best option however because members of that queue will see it twice. You can solve this by using some advanced steps to displaying information in the dashboard. You will not need to touch the custom.config anymore nor will you need to restart IIS. Simply save CustomDashBoard.ascx and refresh the browser.
Step 5 - Further Customization
Example 2: Limiting queue to specific workers/queues.
Here we will be using the same query and controls we created earlier, but limiting the display of this information to certain workers or queues. To accomplish this, we will be using Select statements.
Select Case queue
Case 14
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "tier1", title, text, whereClause, reportPeriodClause)
SetHyperLink(hlOpenTier1, title, text, whereClause, TryString("sidALLDATES"))
lblOpenTier1.text = "Queued [Tier 1]:"
hlOpenTier1.visible = True
lblOpenTier1.visible = True
End Select
In this case, only members of queue 14 will see the additional queue on the dashboard. To show Tier 1 queue's information to multiple queues, you can list multiple IDs in the cast statement like shown.
Select Case queue Case 14, 72, 87
To display this information to specific workers instead of specific queues, use CurrentWorker.worker_id.
Select Case CurrentWorker.worker_id
Case 48, 46, 59, 62, 43
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "tier1", title, text, whereClause, reportPeriodClause)
SetHyperLink(hlOpenTier1, title, text, whereClause, TryString("sidALLDATES"))
lblOpenTier1.text = "Queued [Tier 1]:"
hlOpenTier1.visible = True
lblOpenTier1.visible = True
End Select
Notice that in all of these examples, there are two new lines making the label and hyperlink control visible. This is because by default we must make these controls invisible.
<aw:Label runat="server" visible="False" class="clsLabel" id="lblOpenTier1" /> <aw:HyperLink runat="server" visible="False" id="hlOpenTier1" command="runQuery" />
Example 3: Modifying the information shown
There are times when you may want to show a query instead of a queue's standing. You may want to be able to keep track of all new incidents that have only the original comment. Just like adding a queue's information you will need to add another query to the xml control.
<query id="NewIncidents" type="WorkItem" title="Open Incidents that have never been modified from " sql="workitem_status_lookup_id NOT IN (400,600) AND workitem_version = 1" />
The next step will be generating the hyperlink. For this example we will be displaying this information to a specific queue.
Select Case queue
Case 41
count = ListDataSet.ProcessQueryDefinitions(dsQueries, "NewIncidents", title, text, whereClause, reportPeriodClause)
SetHyperLink(hlOpenNewIncidents, title, text, whereClause, TryString("sidALLDATES"))
lblOpenArticleReview.text = "Queued [New Incidents]:"
hlOpenNewIncidents.visible = True
lblOpenNewIncidents.visible = True
End Select
And lastly we will need to create the label and hyperlink to display the data on the dashboard.
<aw:Label runat="server" visible="False" class="clsLabel" id="lblOpenNewIncidents" /> <aw:HyperLink runat="server" visible="False" id="hlOpenNewIncidents" command="runQuery" />
If you look through the attached CustomDashboard.ascx, you will see all of these examples in use plus more. A quick note on Select Case statements for those that aren't programmers. A single Case can only appear in a Select statement once. For instance
Select Case CurrentWorker.worker_id Case 15 Code A Case 21 Code B Case 21, 35 Code C Case 49, 94, 101 Code D End Case
As the Select Case is read, you might assume that for worker 21, both Code B and Code C will be executed. This is not the case however. The system will find the FIRST case that matches the worker's ID and run it and only it. To get around this, use multiple Select Case statements.
Select Case CurrentWorker.worker_id Case 15 Code A End Case Select Case CurrentWorker.worker_id Case 21 Code B End Case Select Case CurrentWorker.worker_id Case 21, 35 Code C End Case Select Case CurrentWorker.worker_id Case 49, 94, 101 Code D End Case
| License: | AJSL By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License |
| Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |

Comments
This is GREAT
Exactly what we were looking for. This allows me to give my supervisors simultaneous views to all queues so they can assign resources as needed. Excellent post!
It is a Great Vista
Exactly what it is required, this allows that all managers of each one of the areas sees queues simultaneously that they belong to him, and supervise the attention states of the Incidents.
Is Excellent Post!!!
IT Consultant
Altiris Certified Engineer
Finally!
This is one of the requriements that I'm looking at needing for moving to Altiris HD. We have not been moving quick and this has been part of the hold up.
Additional Customization
It would be really nice if this were to work off a Pseudo-Group Assignment. I think this could be added by modifying the Worker Table and associated views. Then calling the value. The contactview and contactedit ascx would have to be over-ridden to allow for a "group" assignment textbox to appear to map to the field within the worker "datastore". I am thinking that then you could add in a value like "group a, group b, group c, etc." then when going through the case statement you could replace the case statement with something like this:
Just a thought.
John Golembiewski
Midwest Practice Principal
ITS Partners
Jgo@itsdelivers
Excellent Great!!!
This is what we were waiting for years ...
Dom
Dom
Great View
This will make a great view for the managers. Now if I can just find someone to make the modifications needed.
Sort - Order By?
Hello,
Could it be possible to sort the list produced by the sql="NOT workitem_status_lookup_id in (400, 600)" />
Thanks,
Dom
Dom
I don't see why not. My
I don't see why not. My understanding of the sql queries is that Altiris handles the beginning of the query (select * from view...) and we provide the conditions. I'm sure if you threw in a "sort by workitem_number" or such it would work.
Need Help on another issue
Hi there JMadigan, I was looking for help on some thing else, when I came across your posting. I was wondering if you can help me.
I am trying to display an identification number stored as a column in the contact table in a field on the new incident screen. I would like to display the Identification number corresponding to the selected contact from the drop-down list. Any suggestions as to how I can achieve this?
Lack of proper technical reference documentation on the appweaver controls really makes it difficult to make any coding changes in Altiris HelpDesk solution. I would appreciate any help in this regard.
Thanks
--SNeeta
Contacts table add
I also need some help with a query to the contacts table.
My Helpdesk workers would like to see a view of VIP tickets.
I know in your notes you have: "Note: You will only have access to fields that are available in workitem_only _view so you are limited on what data you can query." but I have gotten the query itself to work with:
when you click on the HL, it will run the query correctly and display the correct results, however I cannot get it to count correctly. It will say "# Incidents" with whatever number from the query above it.
I tried to add vip_flag from the contact table to the workitem_only_view and that royaly screwed things up.
I also put a Isnumeric tag to see if the vip_flag results were numeric and they were.
Any idea on how to get the HL to count the number correctly?
Would you like to reply?
Login or Register to post your comment.