Login to participate
Endpoint Management & Virtualization ArticlesRSS

Manual Incident Survey Submission

Steve Wayment's picture

Many people have asked me if they could submit a survey for a resolved incident.  From my experience, if someone wants to go out of their way to provide feedback it is best to allow them to do so.  However, usually we do not want to send a survey to everyone, especially in a company with a large userbase.  This article will show you how to configure your Winuser screen to allow users to provide feedback at their leisure.

First, you need to edit the ConsoleMyHDEditItem.ascx file.  If you haven't already done so, now is a good time to create a Custom.config file in your Winuser folder.  There are other articles that can help you customize your console if you need help.  (Try https://kb.altiris.com/article.asp?article=44217&p=1 to get you started.)

In the ConsoleMyHDEditItem file, search for lblnumber copy and paste this code on the line above (under </aw:ControlBar>)

<aw:HyperLink id="hlSurvey" runat="server" Command="satSurvey" text="** Submit a Survey for this incident **" Label="" >
	<aw:Param name="id" ItemDataField="workitem_number" />
</aw:HyperLink>

You may want to format the position a bit. If you don't know how to format within the code, you can simply use image spacers and other workarounds.  For example, You could indent the text from the left of the page by changing your text parameter to the following:

text="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;** Submit a Survey for this incident **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"

It doesn't look pretty, but it gets the job done.  The spaces to the right of the text is simply to make the link symmetrical upon mousover.
Also, you can add some room to the top and bottom of the link by adding Spacer images.  Your final code may look something like this:
 

<aw:Image ID="SurveySpacer1" runat="server" ImageUrl="spacer" colspan="2" height="20" />
<aw:HyperLink id="hlSurvey" runat="server" Command="satSurvey" text="&nbsp;&nbsp;&nbsp;&nbsp;** Submit a Survey **&nbsp;&nbsp;&nbsp;&nbsp;" Label="" >
	<aw:Param name="id" ItemDataField="workitem_number" />
</aw:HyperLink>
<aw:Image ID="SurveySpacer2" runat="server" ImageUrl="spacer" colspan="2" height="20" />

This will display the Survey link on the incident "view" page.  If you would like to display the link on the "edit" page, copy and paste your final code above the line of code that contains lblNumber2.  You will need to edit the hyperlink and image IDs to something different.  I would suggest SurveySpacer3 & 4 and hlSurvey2.

Personally, I don't want users submitting Surveys for incidents that are still in process.  So I have added code to hide the link until the incident has been closed.  (You may choose to display the link for various circumstances.  Just play with the code and you can have the link visible or invisible for a variety of situations.)  I have placed my code at the bottom of Public Overrides Sub LoadDataSources().  I used this sub because I have other functionality happening during that process.  You can place your code at the same location without affecting anything else.  Copy and paste this code above End Sub:

if w.current.workitem_status_lookup_value = "Closed" then
	hlSurvey.Visible = "True"
	hlSurvey2.Visible = "True"
	SurveySpacer1.Visible = "True"
	SurveySpacer2.Visible = "True"
	SurveySpacer3.Visible = "True"
	SurveySpacer4.Visible = "True"
else
	hlSurvey.Visible = "False"
	hlSurvey2.Visible = "False"
	SurveySpacer1.Visible = "False"
	SurveySpacer2.Visible = "False"
	SurveySpacer3.Visible = "False"
	SurveySpacer4.Visible = "False"
end if

If you did not use the same IDs, or all of the Spacers that I used, you will need to modify the code accordingly.

I made one final touch to my survey, adding a smiley/frowny face scale above the radio buttons to indicate the level of satisfaction.  Some people may find this useless and silly, but I think it improves the feel of the survey.  Besides, who doesn't like smiley faces?

Survey Smileys

You may also notice that my Cancel "button" is actually a link.  I changed it to allow me to take the user directly back to their incidents list instead of the default "Thank You" screen.  If you would like to know more about this just leave a comment.

Adding the image to your survey is very simple.  First, copy the survey.png image (attached) to your Custom or your Images folder.  Next, you will need to edit the SatisfactionSurvey.ascx file.  (Preferrable copy it to your Custom folder and edit your custom.config file.)

Here you will remove the line:
 

<aw:Label id="lblScale" Label=" " Text="sidSatisfiedScale" Runat="server" />

And add this line in it's place:
 

<aw:Image ID="imgScale" RunAt="server" ImageUrl="http:\\servername\aexhd\Custom\survey.png" />

Remember to edit servername to the name or IP of your helpdesk.  You could also create an alias for this image within your custom.config file, but I wanted to make the change without restarting IIS.  I will do that properly at a later date.  The code to place in your custom.config file would look like this:
 

<imgFiles path="~/Custom/">
	<imgFile id="survey" file="survey.png" width="541" height="37" alt="Rating Scale"/>
</imgFiles>

At which point you would change your SatisfactionSurvey.ascx code to the following:
 

<aw:Image ID="imgScale" RunAt="server" ImageUrl="survey" />

Remember to Reset IIS or else your changes will not appear.

Also note that this image was formatted for the original survey.  If you have modified your survey questions, you may need to increase or trim the space the the left side of the image.  (I was too lazy to spend time editing the code for a layout that will most likely never change.)  The image and radio buttons will already scale symmetrically with any font size changes or "page zooming", so I feel ok about leaving it the way it is.