Apr 23, 2013 at 2:28 PM
Edited Apr 23, 2013 at 2:30 PM
I'm trying to develop a script whereby I can retrieve all the Items in a List, count the number of each type of Status, and insert each of those counts into a different list to be used for historical reporting on the number of [each] status on a given day (XL
area plot reports).
I don't believe SharePoint has a scheduler service so I'm expecting the owner of the List data will go to a page each day, click an "Update History" button, and the script will run in the background to retrieve, sum, insert into history list ... and
give some level of process execution status while it is running ...
Many of my customers have been looking for historical reporting of Status and Assigned To: for the purposes of load balancing work and determining how many analysts are necessary against the call volumes of tickets...
- Retrieve all the List Items from List A for the Status field (ID, Title, Status)
- For each of the unique Status values, count the number of records in List A with that Status
- Insert a new record into List B with:
--- date stamp
--- status value
--- count of status value
Each day, List B would have Values like-
2/10/2013 New 12
2/10/2013 Active 10
2/10/2013 Closed 5
2/10/2013 Cancelled 6
2/11/2013 New 10
2/11/2013 Active 11
2/11/2013 Closed 6
2/11/2013 Cancelled 6
May 1, 2013 at 2:01 PM
SharePoint does indeed support timer jobs, but that requires server side code pre-2013 or apps in 2013.
If you want to go with script, you can use GetListItems to retreive items from a list, do your tallies in your script, and write the results back to another list using UpdateListItems.