0

I have made a satisfaction survey in SharePoint 2013.

I am asked to get automatic email send every week with graphical summary.

Is it possible ? should I use workflow option ?

1 Answer 1

0

Yes, SP Designer Workflow can be easily created for the survey list and add the add Action[send email] on every week.
To calculate everyweek functionality you can create a calculated column which calculates every Friday/end of the week from the date of survey creation and access this value inside your SP D workflow and trigger accordingly.

Second approach is that, you can create a SP Timer job which monitors this survey list and compare the today's date with the survey creation date and check the weekend/[friday/saturday] and configure to run this on every night 12 AM. ANDREW-CONNEL has given a detailed explanation about sp timer jobs.

Below is the working code for creating google chart against a SPList I have created.It displays line chart. you can draw pie chart/bar chart based on your requirement:

 <script language="javascript" src="/project/SiteAssets/jquery- 1.8.2.min.js" type="text/javascript"></script> <script language="javascript" src="/project/SiteAssets/jquery.SPServices- 0.7.2.min.js" type="text/javascript"> </script> <script type="text/javascript" src="https://www.google.com/jsapi?autoload={ 'modules':[{ 'name':'visualization', 'version':'1', 'packages':['corechart'] }] }"></script> <script type="text/javascript"> google.setOnLoadCallback(drawChart); function drawChart() { //alert('inside drawchart'); var SalesData = GetMySalesData(); var optionsSalesData = { title: 'sales Chart', vAxis: { viewWindow: {min: -1}, title: "sales Chart", displayAnnotations: true }, hAxis: { title: "columnNVSMonths" }, pointSize: 5, legend: { position: 'right' } }; //alert('b4 calling chartsales'); var chartSales = new google.visualization.LineChart(document.getElementById('salesChart')); //alert(' chartresources object exists '); //alert(chartSales); chartSales.draw(SalesData, optionsSalesData); //alert('drawing completed'); } function GetMySalesData() { //alert('get my sales data'); var data = new google.visualization.DataTable(); //data.addColumn('string', 'Year'); //var fiscalYear = formatStr($(this).attr("ows_FiscalYear")); data.addColumn('string', 'NVSMonthName'); //data.addColumn({type: 'datetime', role: 'annotation'}); data.addColumn('number', 'NVS_Planned'); //data.addColumn({type: 'number', role: 'annotation'}); alert('b4 calling spservices get list items'); $().SPServices({ operation: "GetListItems", async: false, listName: "salessurveyList", CAMLQuery: "<Query><Where><IsNotNull><FieldRef Name='Title'/> </IsNotNull></Where></Query>", CAMLViewFields: "<ViewFields><FieldRef Name='Title' /> <FieldRef Name='NVSMonthName' /> </ViewFields>", CAMLRowLimit: 0, completefunc: function (xData, Status) { //var itemCount = $(xData.responseXML).SPFilterNode("z:row").attr("ItemCount"); //alert("itemCount :" + "" + itemCount); var count = 0; //$(xData.responseXML).find(" [nodeName='z:row']").each(function() $(xData.responseXML).SPFilterNode("z:row").each(function() { count = count + 1; //console.log(' current count is ..'+ count); //alert(xData.responseText); //alert(xData.responseXML.xml); var titleofresourcelist = $(this).attr("ows_Title"); var nvsMonthName = $(this).attr("ows_NVSMonthName").split(";#")[1]; //console.log(nvsMonthName); var NVSPlanned = $(this).attr("ows_NVS_Planned"); //console.log('adding into data table'); data.addRow(["'"+ nvsMonthName +"'"]); }); } }); return data; } </script> <div> <div id="SALESChart" style="width:455px;height: 400px;float:left ;margin:0 auto;display:block"></div> </div> 
6
  • Thank you, I am doing first steps in the SP Designer and SP. Is there a way to specify or indicate some sources where can I find how to create this specific calculated column for every Friday or Saturday ? And it will send an email with complete graph stats ? Commented Feb 17, 2016 at 10:19
  • am not sure about how to send the graphical summary.You can create google charts using javascript and google API , this javascript code needs to be added inside the content editor web part OR immediately below sp designer's <content placeholder tag> OR create a js file with the chart/graphical summary code and upload this js file into a SiteAssets library and refer this js file within a content editor web part. Commented Feb 17, 2016 at 10:26
  • pls refer this link for calculated columns : :sharepoint.stackexchange.com/questions/74474/… you can get the dayof the week as well. Commented Feb 17, 2016 at 10:31
  • Lynda has detailed about WF which send email :lynda.com/SharePoint-tutorials/Creating-workflow-sends-email/… About dates in calculated field check here :abstractspaces.wordpress.com/2009/05/02/… Commented Feb 17, 2016 at 10:33
  • Thank you very much ! I'll check it out and keep you inform about evolution. Commented Feb 17, 2016 at 10:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.