Share via


How to create SCSM 2012 Satisfaction Survey using Sharepoint Foundation 2010

The SCSM 2012 does not have a builtin satisfaction survey feature. To do this, you can use the SharePoint to create a form. On the previous version of SCSM 2010 I used the Sharepoint Services 3.0, now on SCSM 2012 I decided to use the Sharepoint Foundation 2010, but there are some differences on them.

To do all this you should read some documentation first:

SharePoint : http://technet.microsoft.com/en-us/sharepoint/ee263910.aspx
SharePoint Designer: http://www.microsoft.com/en-us/download/details.aspx?id=24309
Sharepoint language pack and service pack is also desirable
Satisfaction Survey: http://blogs.technet.com/b/servicemanager/archive/2009/12/08/incident-resolution-satisfaction-surveys-on-sharepoint.aspx
Satisfaction Survey tip: http://blogs.technet.com/b/carlospantoja/archive/2012/08/09/incident-resolution-satisfaction-surveys-on-sharepoint-2010.aspx
Create an e-mail template:http://blogs.technet.com/b/servicemanager/archive/2009/09/28/creating-notification-templates-in-system-center-service-manager.aspx

After that you shoul follow some steps:

  1. Deploy a Sharepoint Foundation 2010.
  2. Install Sharepoint Designer 2010
  3. Create a Survey
  4. Customize the Survey form
  5. Create an e-mail template
  6. Create a workflow to send an e-mail eveytime an incidente is closed

To create the survey you have to:

  1. Create a website application
  2. Create a Site on SharePoint
  3. Create a Survey

To customize the survey you have to:

  1. Use the SharePoint designer
  2. Open the survey site
  3. At All Files -> <Survey Site> -> NewForm.aspx -> Open With -> Notepad . add the following text below "<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server" >" section:
    1. // This javascript sets the default value of a input field identified
          // by <<FIELD DISPLAY NAME>> to the value stored in the querysting variable
          // identified by <<QUERYSTRING VARIABLE NAME>>
       
          // NOTE: this only works for single line of text inputs
       
          // Customize this javascript by replacing <<FIELD DISPLAY NAME>> and
          // <<QUERYSTRING VARIABLE NAME>> with appropriate values.
        
          // Copyright(c) Microsoft.  All rights reserved.
          // This code is licensed under the Microsoft Public License.
          // http://www.microsoft.com/opensource/licenses.mspx
       
          // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND,
          // EITHER EXPRESSED OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES
          // OF FITNESS FOR A PARITCULAR PURPOSE, MERCHANTABILITY, OR
          // NON-INFRINGEMENT.
       
          // Original Author: Travis Wright (twright@microsoft.com)
          // Original Creation Date: Dec 7, 2009
          // Original Version: 1.0
       
          _spBodyOnLoadFunctionNames.push("fillDefaultValues");
       
          function fillDefaultValues() {
              var qs = location.search.substring(1, location.search.length);
              var args = qs.split("&");
              var vals = new Object();
              for (var i = 0; i < args.length; i++) {
                  var nameVal = args[i].split("=");
                  var temp = unescape(nameVal[1]).split('+');
                  nameVal[1] = temp.join(' ');
                  vals[nameVal[0]] = nameVal[1];
              }
              setInputValueFromFieldName("IncidentID", vals["IncidentID"], true);
              setInputValueFromFieldName("Analyst", vals["Analyst"], true);
              //setLookupFromFieldName("<<FIELD DISPLAY NAME>>", vals["<<QUERYSTRING VARIABLE NAME>>"]);
          }
       
          function setInputValueFromFieldName(strFieldName, strValue, boolHide) {
              //this gets the input textbox so you can set the value
              var tag = getTagFromTagNameAndTitle("input", strFieldName);
              tag.value = strValue;
       
              //if you want to hide the input textbox pass boolHide = true
              //this is ugly but the only way to do this given the way SharePoint lays out forms
                 if (boolHide) {
                  tag.parentNode.parentNode.parentNode.style.visibility = "hidden";
                  var TDs = document.getElementsByTagName("TD");
                  for (var i = 0; i < TDs.length; i++) {
                      var tempString = TDs[i].id;
                      if (trim(TDs[i].innerHTML) == strFieldName) {
                          TDs[i].parentNode.style.visibility = "hidden";
                      }
                  }
              }
          }
       
          function getTagFromTagNameAndTitle(tagName, title) {
              var tags = document.getElementsByTagName(tagName);
              for (var i = 0; i < tags.length; i++) {
                  var tempString = tags[i].id;
                  if (tags[i].title == title) {
                      return tags[i];
                  }
              }
              return null;
          }
       
          function trim(str, chars) {
              return ltrim(rtrim(str, chars), chars);
          }
       
          function ltrim(str, chars) {
              chars = chars || "file://s/";
              return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
          }
       
          function rtrim(str, chars) {
              chars = chars || "file://s/";
              return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
          }
       
      </script>
  4. Save the file
  5. Test the survey form to see if it hides the IncidentID and Analyst Fields

Now you have to create an e-mail template and a workflow to send the mail to the user when the incidente is closed.