10
votes
6answers
24k views

CAML query that includes folders in result set

I'm trying to write a CAML query that executes against a specific SPList, scoped to a specific folder, recursive from that point, and returns all ListItems (which meet a criteria) and Folders. Here's ...
11
votes
2answers
14k views

SharePoint: How to get Top 5 records by using CAML query from a list

I have already created a webpart to show the data from list, but I really want is to only show top 5 records from that list (by using CAML query). Does anyone know how to do this? Many thanks. ...
3
votes
3answers
6k views

MAX query using CAML

I want to select a sharepoint list item which has the Maximum value for a particular column. How can I do this using CAML queries?
8
votes
5answers
21k views

What is the best way to retrieve distinct / unique values using SPQuery?

I have a list that looks like: Movie Year ----- ---- Fight Club 1999 The Matrix 1999 Pulp Fiction 1994 Using CAML and the SPQuery object I need to get a distinct list of ...
4
votes
4answers
3k views

How to create a wiki page (=item) in Sharepoint programmatically?

how do I create a wiki page and add a title, as well as some content in sharepoint (via webservices)? This is my SOAP message so far: <soapenv:Body> <soap:UpdateListItems> ...
8
votes
2answers
23k views

CAML query with nested AND's and OR's for multiple fields

I am working on proof-of-concept code to dynamically generate CAML based on keywords provided to a highly-specific search web service that I am writing. I am not using the SharePoint-provided search ...
7
votes
6answers
12k views

CAML queries: how to filter folders from result set?

I'm using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection. Now problem is I can't get rid of folders which ...
4
votes
3answers
5k views

U2U Caml Query Builder no longer available?

I'm trying to download the fantastic U2U Caml Query Builder but all the links I'm finding are dead and I can't find any references to it on the u2u site. Has it been end-of-lifed? Does anyone know of ...
1
vote
1answer
4k views

Sharepoint Content Query Web Part: Show items from “events” list that are set to occur or reoccur within a month

I've been reading this msdn post: http://msdn.microsoft.com/en-us/library/aa981241.aspx trying to edit the content query web part to only show items from the event list which either occur within 30 ...
3
votes
1answer
154 views

Trouble with OR in Sharepoint CAML

I'm trying to query a list and get newsletter articles back that match the list of active newsletters. The trouble comes in when trying to pull items via CAML. If I do an OR loop with two CONTAINS, ...
1
vote
2answers
2k views

Using part of date in CAML query

The title column in my list contains year only. I want to make a view, where I would display only last 3 years. I'm trying to use CAML query in List definition: <Query> <Where> ...
1
vote
4answers
2k views

SharePoint CAML Query to T-SQL

I was hoping to do convert a CAML query into T-SQL. For my SharePoint site, I also have a data warehouse (SQL Server 2005) which hosts the same data (it is populated through SPList EventReceivers: ...
1
vote
6answers
6k views

Determine Total Count Of Items Returned By SPQuery

I'm running a number of CAML queries against a large list in SharePoint 2010, and displaying the results in a gridview to the end user. I wish to page through the results returned by the query to ...
1
vote
2answers
3k views

CAML return only 10 results

Is it possible using CAML to limit the amount of results returned. Say for example my query would pull back 25 results I would like the first 10 only.
0
votes
1answer
1k views

Get User URL using CAML Query

I am making use of CAML Query to filter the records from list into DataTable. I have a SPUser Field in my list. I am endeavoring to obtain the user id of each user in CAML Query. Any insights on how ...

1 2
15 30 50 per page