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 ?
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>