I am trying to programmatically access data from a Sharepoint 2010 document library specifically these are promoted fields created by Infopath 2010 form using a CAML query. There is a condition in the where statement, a groupby is required and only want
the column specified in the groupby to be returned.
As the are promoted fields from an infopath form I am using the internal name as well. I have three rows of data:
Year Round Accepted (plus several more columns not relevant for this query)
2012 1 No
2012 2 No
2013 1 No
My expected results would be only two rows returned:
However, what is returned is 3 rows of data. What am I doing wrong? Any feedback or suggestions much appreciated.
BTW I have tried using U2U CAML builder but there is no groupby.
SPList claimsList = claimsSite.Lists["Claims"];//get the library list of claims
SPField fldAccepted = claimsList.Fields["Accepted"];
string strAccepted = fldAccepted.InternalName;
SPField fldYear = claimsList.Fields["Year"];
string strYear = fldYear.InternalName;
SPField fldRound = claimsList.Fields["Round"];
string strRound = fldRound.InternalName;
View Complete Post