Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to retrieve items from a SharePoint list using REST, and then sum one of the columns. I'm brand new to REST, and didn't see a way to do this on MSDN. Is it possible to sum a column in a REST query?

I'm using InfoPath to collect the data. Would I be better off submitting it to SQL Server and then building the report from there, instead of submitting the data to a SharePoint list and using REST?

share|improve this question
    
You shold not run queries directly towards SharePoint databases, always only through supported API. –  Jussi Palo Feb 13 '12 at 20:37
add comment

1 Answer 1

up vote 1 down vote accepted

I believe you cannot use aggregate functions with REST.

"This release does not support Aggregate functions (sum, min, max, avg, etc) as they would change the meaning of the ‘/’ operator to allow traversal through sets." Source

My only suggestion would be to get the items and do calculate the SUM on client side, if possible.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.