开发者

How to retrieve the sum of items from a sharepoint list

Is there any way to get the sum of items based on some filters from sharepoint list? I was trying to access the GetListItems method. But this returns all the items in the list. That makes the data heavy. My requirement is to get only the sum of items.

For example items created in a specific year. I am trying to populate a chart in flex from the sharepoint list. Accessing all the items and then calculating the sum in flex will not开发者_高级运维 work always where the list contains more items.


Use the viewFields parameter of GetListItems to only return a single (small) field like ID. It is still data heavy but better than returning all the fields from the list.

There is a rowLimit parameter too that you can use to return all the list items instead of only a block at a time.

Info on the GetListItems method with code snippets at MS:
http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems(v=office.12).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜