Note that there are some explanatory texts on larger screens.

plurals
  1. POSharepoint Lists - GroupBy?
    primarykey
    data
    text
    <p>I'm trying to get data from a Sharepoint list and put it into some Flex graphs. I can call the list data just fine using a CAML query, but I want to use a GroupBy to consolidate the rows by Teams. So, for example Team 1 may have 20 records, Team 2 may have 8 records, and Team 3 might have 25 records... Instead of showing 53 records, I want to show 3... just "Team 1, Team 2, Team 3" and the sum of the cost of each entry.</p> <p>I see where CAML provides a GroupBy element, but I can't seem to get it to work. Also, I was only able to get the OrderBy element to work when I used the OrderField element instead of the FieldRef element like 90% of the books and websites recommend. If I do use FieldRef, OrderBy doesn't work anymore, which makes no sense to me. Something must be awry...</p> <p>Here is my CAML Query as it stands...</p> <pre><code>--------------------------------------------------- &lt;queryRequest xmlns="http://schemas.microsoft.com/sharepoint/dsp"&gt; &lt;dsQuery resultContent="dataOnly" resultRoot="Rows" resultRow="Row" columnMapping="attribute"&gt; &lt;ViewFields&gt; &lt;FieldRef Name="Team"&gt;&lt;/FieldRef&gt; &lt;FieldRef Name="Cost"&gt;&lt;/FieldRef&gt; &lt;FieldRef Name="EANo"&gt;&lt;/FieldRef&gt; &lt;/ViewFields&gt; &lt;Query&gt; &lt;GroupBy collapse="true"&gt; &lt;FieldRef Name="Team"/&gt; &lt;/GroupBy&gt; &lt;OrderBy&gt; &lt;OrderField Name="Cost"/&gt; &lt;/OrderBy&gt; &lt;/Query&gt; &lt;/dsQuery&gt; &lt;/queryRequest&gt; --------------------------------------------------- </code></pre> <p>This is with OrderBy working, but GroupBy not working. Help!</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload