I have a SharePoint list and an associated view with a group by and some column aggregation that generates some sum's. But when I queried the view through web services I quickly realized that the grouping and summing is only part of the view definition, it doesn't show up in the raw data returned when you query the view through web services.

In truth, I don't even need to drill into my data, I just want to see list items that show me the grouped data, and I'd like this data to be returnable from web service calls. I'm OK if if I need to build the view using SharePoint Designer, but I'm not even sure if it's possible to do what I'm trying to do.

Here is what my test view looks like in XML:

<View Name="{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}" MobileView="TRUE" Type="HTML" DisplayName="Month View" Url="/sites/testsite/Lists/Daily Data/Month View.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/generic.png?rev=23" >
        <GroupBy Collapse="TRUE" GroupLimit="30">
            <FieldRef Name="Month"/>
            <FieldRef Name="Month"/>
        <FieldRef Name="Month"/>
        <FieldRef Name="Sum"/>
        <FieldRef Name="Count"/>
    <RowLimit Paged="TRUE">30</RowLimit>
    <Aggregations Value="On">
        <FieldRef Name="Sum" Type="SUM"/>
        <FieldRef Name="Count" Type="SUM"/>
    <XslLink Default="TRUE">main.xsl</XslLink>
    <Toolbar Type="Standard"/>

SharePoint View

  • Your question is not clear. Are items missing from the view? What do you expect to see and what do you see instead? Can you post a screenshot to illustrate?
    – teylyn
    May 10, 2014 at 0:09
  • @teylyn - I've posted a screenshot. The column that says "August-2013" lots of times is a calculated column that I use to group items by month/year. When I query the view through web services I'd like to get back the groups with their sums. So specifically I'd like to see an entry in the result XML for "August-2013", "Weight" SUM=47,699, "Shipped" SUM=1,845. This data is not returned at all when you query a view through web services.
    – Peter
    May 10, 2014 at 2:50
  • I don't do code, so I'm not clear what can or cannot be done with web services. You say you're fine with SPD. Create a DVWP with groupings and total and you're done. You can shape the XSL any way you like. If you don't want to drill into details, don't use the row details. Just use the group headers or footers.
    – teylyn
    May 10, 2014 at 4:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.