I'm new to SharePoint and have a general question regarding list comparison. Currently, there is a user generated list that is constantly changing, and I wanted to gather quantitative data regarding the changes. Each day, I come in at 8:00 and then leave again at 5:00. I want to know what/how many items are in that list at 8:00 vs. 5:00 and then be able to review the results. For example, the list contains current projects that I need to finish. If there are 20 when I come in at 8:00, and 3 when I leave, I want to be able to view data that I completed 85% of the projects and 17/20. Is this possible?
*Note, currently, I do not have SharePoint Designer or access to the server. Assuming access is needed and I can get it, what would be the best way to approach this?
There's really no built-in way to do this. But with all things SharePoint, there are multiple ways to accomplish things. Since you don't have access to SP Designer, or the server itself, probably the path of least resistance would be to use the SP Web Services to query the list (say, at 8AM) and get a count of items, store (persist) the item-count somewhere, then query the list again (5PM), and check it against the initial day's count, and give you a total.
You can access List data via the SP Web Services at http://server_name/_vti_bin/Lists.asmx
. Use something like the code below to get the list count. You can persist the stored value anywhere - text file, local storage, memory..
Note, you need to add a Web Service reference to your project. In the code below, this is named sp2010, but obviously you can name your whatever you want. The variable listItemCount will hold your list count. Much of the rest of the code should be self-explanatory.
sp2010.Lists spList = new sp2010.Lists() { Credentials = new NetworkCredential("username", "password") };
string listName = "YourListName";
string listItemCount = string.Empty;
XmlNode listXML = spList.GetListItems(listName, null, null, null, null, null, null);
XmlDataDocument innerXml = new XmlDataDocument();
innerXml.LoadXml(listXML.InnerXml);
XmlNodeList rows = innerXml.GetElementsByTagName("rs:data");
foreach (XmlNode attribute in rows)
{
// listItemCount holds the count of your list
listItemCount = attribute.Attributes["ItemCount"].Value;
}