Collaborative Application Markup Language (CAML) is an XML-based language that is used in Microsoft SharePoint Foundation to define the fields and views that are used in sites and lists.

learn more… | top users | synonyms

9
votes
2answers
8k views

Where can i download the U2U CAML query Builder for Sharepoint 2010?

I have try to download form below links. But the site is not opening. http://www.u2u.be/res/Tools/files/CamlBuilderSetupv4.0.0.0.zip . http://www.u2u.be/res/tools/camlquerybuilder.aspx ...
7
votes
2answers
730 views

Can a CAML query find all documents that were ever modified by a specific user?

I'm trying to list all documents that were (ever) modified by a specific user, using a CAML query like this one: var query = new CamlQuery{ ViewXml = "<View Scope='Recursive'>" + ...
6
votes
1answer
494 views

SQL Injections with SharePoint 2010 CAML Queries

IBM Appscan has detected that some pages in our system are vulnerable to SQL Injection. The report shows which URLs are vulnerable, so I checked the pages based on the URLs, but most of the pages ...
4
votes
4answers
5k views

Multiple Values in CAML query from Array? SharePoint 2010 using jQuery/SPServices

So if I use SPServices to GetListItems with CAMLQuery, is it possible to insert multiple values inside Value Type='Number'> here I would like to evaluate things throught a flow in my page, add to an ...
4
votes
1answer
2k views

Can I sort CAML queries by multiple fields?

I have the following query: <query> \ <Query> \ <Where><Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>0</Value></Eq></Where>\ ...
4
votes
4answers
4k views

CAML vs LINQ vs SQL

So LINQ is a front end to CAML so of course CAML is faster, and CAML is a front end to SQL so of course SQL is faster. However what would be a good test to see where and when to use each of these on ...
4
votes
1answer
700 views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
3
votes
1answer
7k views

Querying a simple list with a 'User' column, using CAML

I'm having some trouble getting a CAML Query working against a very simple list. My custom list has the fields: Person : User Date : Date Amount : Lookup My query looks like this: <Query> ...
3
votes
2answers
392 views

CAML query for sharepoint list not working

I have a CAML query where I am getting records between a date range for a sharepoint 2010 list through an asmx web method call. It looks like this ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
3
votes
1answer
763 views

CAML Query OrderBy ignoring non set values

I'm currently writing some CAML Query for a QueryOverride in one of my Content Query Web Parts as I'm in need of multiple "Sort by" fields. My issue is that one of the additional fields that I need ...
3
votes
1answer
3k views

CAML Query Lookup/Choice Value Type as Text

So, here is some lines of code that i write to retrieve data from Sharepoint list using CAML query. string qryCaml = string.Format(@"<Where> <And> ...
3
votes
2answers
3k views

Multiple fields to same list in join (CAML)

Current situation: ============= In my example, I've got 2 custom lists: Accounts Addresses In the "Accounts"-list I've created 2 lookup columns to the "Addresses"-list Address1 Address2 When ...
3
votes
1answer
2k views

SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively

I have seen a lot of examples and questions about this out there but nothing I have found has helped me accomplish this. I need to be able to grab all the names of the documents within a given ...
3
votes
1answer
5k views

How to retrieve items from document libraries using client context without performance lag

I need to retrieve items/list items from SharePoint 2010 document library and display it in a list ListView using C#. I have used following CAML query to retrieve list items and its properties. ...
3
votes
1answer
603 views

SP2010: Strange behavior querying on taxonomy field

I need to query a document library to get items associated with some taxonomy terms, or items with specific documentId (site collection scoped feature, not the integer ID of the item), but the whole ...
2
votes
2answers
782 views

CAML query to retrieve the second set of three list items from the announcements list?

The CAML query to pull say 3 items based off of the following requirements seems pretty starightforward: Title is not null Expires(Expiry Date) is greater than or equal to Today Order Created in ...
2
votes
1answer
141 views

CAML Query where X =(A && B && C && D)

CAML makes me sad some days. Can someone point me in the right direction for the syntax in regards to a CAML query that would evaluate where X= A&B&C&D. My nesting is all off i'm assuming. ...
2
votes
2answers
69 views

Items not showing in folder?

Basically, I have a situation where instead of creating 10 individual document libraries, I've created one and filter each "region" as such by subfolders in the library. Canada Finance > Document ...
2
votes
4answers
4k views

CAML Query Filtering with OffsetDays

I'd like to set up a CAML query in a Data View Web Part (DVWP) that works like this: If a date is not specified on the Query String, then show me items created in the last 30 days If a date is ...
2
votes
2answers
983 views

Error in CAML Query with multiple “AND”

When I run the following query I get an error: <Where> <And> <Eq> <FieldRef Name="IssueLOB" LookupId="TRUE" /> <Value ...
2
votes
1answer
42 views

CAML - how important is it? [closed]

What is your experience when you go dealing with caml coding? Do you have to do lots of caml coding or is it compulsory to enable to read only?
2
votes
1answer
165 views

is querying a perticular folder faster?

I have a folder in document library if I get the folder from folder collection of the document library and only query the items inside that folder will it work faster then querying a whole library ...
2
votes
2answers
1k views

SPQuery works on libraries under the list view threshold, but not over

So I am building a webpart which enumerates all doclibs in the current web, grabbing all checked out files and listing them in a table, allowing a user to apply some required metadata and check in ...
2
votes
2answers
347 views

CAML Query behaving differently in CAML Builder and Code

Based on feedback from my earlier question, I have constructed a query using the excellent CAML Builder tool: <Where> <Or> <Membership Type='CurrentUserGroups'> <FieldRef ...
2
votes
1answer
74 views

Adding 2 Caml queries in same executeQueryAsync

Is it possible to use two different queries to get to different lists and use them in the same executeQueryAsync() Something like this : var camlQuery = new SP.CamlQuery(); ...
2
votes
2answers
1k views

CAML query to filter items by Content Type, independent of column name

In a SharePoint list I have a column, created using a custom content type. Let's say, the content types is "MyContentType". I used in a column "My Custom Column". Need to filter out items if the "My ...
2
votes
1answer
2k views

CAML query limitation of values in IN operator

I have less than 5000 items in my library. I want to get 530 items by ids. So I am using following query. <Where> <In> <FieldRef Name="ID" /> <Values> ...
2
votes
2answers
874 views

What does the “Overwrite” attribute in a site column definition actually do

I'am deploying some site columns, content types and lists to my site via CAML definition. This works as expected. However, I faced problems with re-using site columns that reference my lists. My site ...
2
votes
2answers
2k views

CAML Query for sub folder documents javascript

I'm trying to query for documents in a specified sub folder of a document library. Using U2U CAML builder, I can generate the query and return successfully within it. However, when I run the query ...
2
votes
2answers
349 views

Nested REST or CAML code to list “NOT-IN” List Join Logic. Possible?

I'm thinking this is possible in SPO 2013? Two Custom Lists. Submitted and Universe (common field employee number) One qualifier condition that applies to both .. dept = Sales I need to list ...
2
votes
1answer
241 views

CAML Query Custom Ordering

I have looked around a bit, but have not found any reference to this particular issue. Is it possible to specify a custom ordering in a CAML query? What I mean by this is, say I have a list with a ...
2
votes
1answer
221 views

Can we query and fetch data from LIST between different subsites using CAML Query.?

Have LIST created under one site, can the same LIST be used to fetch data from other site using CAML Query.? eg: Consider a LIST "xxx" created under SitePages/AAA/Lists/ Can i access the LIST "xxx" ...
2
votes
1answer
766 views

Caml Query - skip X first results

Let's assume I have list with 100 items. Is it possible to write CAML query to get 5 items, but skip 10 items from the beggining? Something like LIMIT and OFFSET in SQL?
2
votes
2answers
352 views

How to Add a ListItem?

I am able to add an item to a list using the CAML below. Now I need to modify it to make sure I can add an attachment as well. What is the syntax to add an attachment? <?xml version="1.0" ...
2
votes
2answers
501 views

When using Sharepoint Client Model I get error : The 'Contains' member cannot be used in the expression

When using 'Contains' in Linq query: var camlQuery = new CamlQuery(); var listItems = list.GetItems(camlQuery); var itemQuery = listItems.Where(i => ...
2
votes
0answers
20 views

CAML query for Sharepoint Calender Lists

I am using CAML query for SharePoint calender list. I am able fetch proper daily data. but when i choose weekly, monthly and yearly, it doesn't give me reports as expected. it doesn't take date ...
2
votes
1answer
297 views

Create Multiple List Items with One Function

Is it possible to create multiple list items with one function in JavaScript / ECMAScript? I know that a single item can be created with the code below, but would like to know if it is possible to ...
2
votes
1answer
56 views

creating CAML queries in a 32 bit environment?

I'm currently developing with SharePoint on my 32 bit computer. While I'm able to make simple changes with designer on my PC I'm aware that using visual studio to make changes (CAML queries) without ...
2
votes
1answer
216 views

Expand recurring events for the next 2 years

How can I get an expanded list of recurring events for the next 2 years? I am currently using this CAML expression: <DateRangesOverlap> <FieldRef Name="EventDate" /> <FieldRef ...
2
votes
0answers
588 views

IsNull not working in CAML query for indexed fields

So for example I have field 'TestField' which is indexed. How can I caml for items where 'TestField' value is null? My example down here will fail and won't find what I am querying for. <Where> ...
2
votes
0answers
282 views

How to find out whether or not a list is hidden without writing code (SP2010)?

Does anyone know if there is a way of telling (without writing any code) whether or not a list is "hidden"? I have a CAML query which contains the following and I'd like to eliminate the possibility ...
2
votes
1answer
297 views

Add content type from sandboxed solution to list definition (farm solution) does not work

I'm using a sandboxed solution from a 3rd party vendor which contains some site columns and a site content type. I want to add this content type to my document library definition in CAML. But when I ...
1
vote
3answers
6k views

Get field value from item in SPListItemCollection

I am confused with SPQuery. How can I use it to get listitem values. Let's say I have a list "Cinema" with 20 columns but i only want 4. Film ID Film Name Film Type Film Review How can i get all ...
1
vote
3answers
66 views

CAML query rertieve all items from a SharePoint list

I have a JavaScript piece of code that I use to retrieve list item from SharePoint by selected options from drop-down list. Depending the selection it would assign a value to a CAMLQuery variable. ...
1
vote
5answers
139 views

Translating a SQL query to CAML query

I am new to CAML query and as much as I have expected it to be simple like SQL I have found it quite frustrating to deal with. I have a simple query SQL query I am trying to translate into CAML but do ...
1
vote
1answer
922 views

SP2010 JSOM: updating with CAML where clause

So I learned and have used the following to update a list item by ID using Javascript Client Object Model: function updateItem(passedID) { var ctx = new SP.ClientContext.get_current(); var myList = ...
1
vote
2answers
134 views

How to write a caml query that filters by .pdf or folders?

How can I write a CAML query (for javascript ecma) that filters by only pdf documents or folders in sharepoint 2010? (this is for document libraries) Thanks.
1
vote
1answer
41 views

About CAML and its content

Problem: I have understood the foundation of CAML and there are some questions that are still unclear in my mind. What context and when should a SP developer use CAML? Why using CAML to retrieve ...
1
vote
1answer
85 views

Caml query returning extra divs

I need my caml query to return only text, e.g. now it's returning me this <div class=ExternalClass104BBsdfEEDCEdddsf48C68C18AsdfB056FBsdfAB805>Real Content.....</div> When I want Real ...