Questions tagged [caml]

CAML (Collaborative Application Markup Language) is an XML based markup language used with the family of Microsoft SharePoint technologies (Windows SharePoint Services and Office SharePoint Server). For the Objective Caml programming language, use the tag ocaml.

CAML (Collaborative Application Markup Language) is an XML based markup language used with the family of Microsoft SharePoint technologies (Windows SharePoint Services and Office SharePoint Server).

Not to be confused with Objective Caml, the current implementation of the Caml programming language. For Objective Caml, use the tag.

Unlike plain XML, CAML contains specific groups of tags to both define and display (render) data.

CAML query syntax can be created graphically from an existing SharePoint list by using the U2U CAML Generator tool.

For getting started with CAML, please visit its MSDN page.

644 questions
30
votes
3 answers

CAML query with nested ANDs and ORs 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 web service for this proof. I have done so already…
Alban
  • 704
  • 1
  • 6
  • 11
22
votes
8 answers

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 are also part of result set. For now I'm…
Marian Polacek
  • 2,906
  • 4
  • 30
  • 37
20
votes
3 answers

CAML query for boolean column is not working

Hi I have a SharePoint list to be queried for my Desktop App and I want to retrieve only the Active Members but when I queried I got only the users who aren't active. What is wrong with my CAML query? camlQuery.ViewXml =…
18
votes
3 answers

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.
Daoming Yang
  • 1,325
  • 3
  • 20
  • 41
17
votes
7 answers

One or more field types are not installed properly. Go to the list settings page to delete these fields

CamlQuery query = new CamlQuery(); query.ViewXml = @"" + "" + "" + fileName + "" + "" + "" + "" +…
kevin
  • 13,559
  • 30
  • 79
  • 104
16
votes
1 answer

OCaml functors, Haskell type classes, and multiple derivation

It is well-known that OCaml has a parametric polymorphism and this leads to some limitations. Haskell, through its type classes, offers an ad hoc polymorphism, which is, obviously, very convenient in several situations. It is also well-known that…
Samuele Giraudo
  • 409
  • 2
  • 14
15
votes
6 answers

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 items from the Year column which will populate a…
Alex Angas
  • 59,219
  • 41
  • 137
  • 210
13
votes
1 answer

SharePoint list CAML query using CONTAINS

I'm trying to query a SharePoint list using the following CAML query in a webpart. I have tested the query in U2U CAML Query Builder and Stramit CAML Viewer and it works fine, only returning the matching records, but when I use it in my webpart it…
Ali_Abadani
  • 725
  • 3
  • 11
  • 24
12
votes
1 answer

Datetime comparison in CAML Query for Sharepoint

i'm trying to have some item from a sharepoint list, depends on date in a custom column. I've created my query with U2U Caml Builder, and that's worked but when I put it in my own code in my webpart, it always return to me all the items od the…
Garcia Julien
  • 756
  • 2
  • 7
  • 20
12
votes
4 answers

SQL IN equivalent in CAML

Is there a "nice" way to create a CAML query for SharePoint that does something like this? SELECT * FROM table WHERE Id IN (3, 12, ...) Or am I stuck with a nightmare of nested nodes? EDIT: This was my solution to generate the nodes. ///…
Chris
  • 4,393
  • 1
  • 27
  • 33
11
votes
5 answers

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 a location where it is still available from? Dead…
Mark
  • 487
  • 1
  • 7
  • 20
11
votes
7 answers

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 the code for the query which seems like it should…
Rex M
  • 142,167
  • 33
  • 283
  • 313
9
votes
2 answers

Global variables in Ocaml

I am looking for a way to define global variables in ocaml so that i can change their value inside the program. The global variable that I want to user is: type state = {connected : bool ; currentUser : string};; let currentstate = {connected =…
Sara4391
  • 121
  • 1
  • 6
8
votes
5 answers

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?
ashwnacharya
  • 14,601
  • 23
  • 89
  • 112
8
votes
5 answers

"does not contain" in CAML?

In CAML I can query SharePoint Listitems using the "Contains"-element, but there is no "does not contain"-element I could use. So what is the best way to get the items that do not contain a string? Is there a better way than to loop through each and…
user4531
  • 2,525
  • 7
  • 30
  • 38
1
2 3
42 43