As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [caml]

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.

Filter by
Sorted by
Tagged with
6 votes
3 answers
7k views

Query multiple lists using javascript/CSOM

I'm about to query multiple lists using JavaScript (JSOM, SharePoint 2010). It's working when querying one list in a time, but that's annoying when I'm having lots of lists. Working example: ...
kolback's user avatar
  • 279
29 votes
4 answers
45k 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> <...
Vikram Shityalkar's user avatar
5 votes
1 answer
20k views

Sharepoint REST API - Using caml query and select/expand to get lookup data

I have a Sharepoint app and I use a caml query to filter the data I get back: var caml = "<View><Query><Where><And><Contains><FieldRef Name='PublishingPageLayout' ...
Paddy1990's user avatar
  • 153
4 votes
2 answers
6k views

Sharepoint CAML Query IN operator

I have a sharepoint list with managed metadata column and I have to find items matching values from columns. If I filter the list for a column, let's say COLUMN1 <In> <FieldRef ...
Gianluca Fares's user avatar
2 votes
2 answers
13k views

Using CAML Query to Retreive from Multiple Lists

I am creating an applicant tool which contains the following lists: Applicant; Applicant Answers; Job Questionnaire; Job Title The lists are related as follows: Applicant.ID = Applicant Answers....
Adrian's user avatar
  • 121
23 votes
4 answers
38k 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 http://www....
madhan's user avatar
  • 259
16 votes
1 answer
68k views

CAML Query, get item by lookup value, not by ID

I have the value of a lookup column, but I don't have the ID, I want to query items from SharePoint list using the lookup value. How do I achieve that in CAML?
SharePoint Freak's user avatar
12 votes
2 answers
41k 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> &...
user avatar
3 votes
3 answers
18k views

Export contents of a sharepoint list to a html table

How can I export the contents of a list to a html table? I know how to extract the elements of a list using CAML Queries, but how do I generate a html table containing the elements dynamically?
bloomingsmilez's user avatar
1 vote
2 answers
15k views

Retrieve single field using CAML Query in Sharepoint using Javascript

I have a List called ProjectInformation and contains following Fields.. ID ProjectName1 ProjectManager ProjectExecution 1 EDS PPB Time and Material 2 CS ...
Pranav Bilurkar's user avatar
16 votes
2 answers
30k 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 ...
Shaamil's user avatar
  • 708
7 votes
2 answers
968 views

Selecting only PowerPoint files in a CAML query

I am trying to select all PowerPoint files in a list. How do I do that? Up until now I used this: class UsedIn { private static NetworkCredential credential = new NetworkCredential("login", "pwd", "...
UsefulUserName's user avatar
6 votes
1 answer
177 views

SharePoint 2010 list Item Query

We have a big list in SharePoint 2010. I'm gonna query SharePoint 2010 list item in the web part based on country. I used CAML and JS. I have got errors in different browser" Internet explorer says ...
Sara's user avatar
  • 897
6 votes
2 answers
10k 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 ...
jonvines's user avatar
  • 161
6 votes
1 answer
814 views

Ignore Null Values in OrderBy Asc While creating CAML Query

I have 3 Columns in my List Id Name SortBy 1 A 1 2 B 3 C 2 4 D 3 and my CAML query is : Query = @"<OrderBy><FieldRef Name='SortOrder' Ascending='False' /&...
BASEER HAIDER JAFRI's user avatar
5 votes
2 answers
16k 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 Type="Lookup">1</...
E7AD's user avatar
  • 107
4 votes
1 answer
6k 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 ...
user1201347's user avatar
4 votes
3 answers
4k 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 <Query><Where><And><Geq><...
prawn's user avatar
  • 247
4 votes
2 answers
2k views

SPSiteDataQuery for Documents using caml query

I am tring to query an entire site collection for all the documents where a certain field is equal to something. For example where LoanCategory = Insurance. I am trying to do this using an ...
BlueBird's user avatar
  • 1,850
3 votes
3 answers
5k views

CSOM get document by ID

I'm using the following CSOM code to retrieve a document title by id: ClientContext context = new ClientContext("http://sharepoint"); List oList = context.Web.Lists.GetByTitle("Documents"); ...
Citizen SP's user avatar
  • 1,762
3 votes
1 answer
1k views

SP2013 use Rest with CAML query and expand lookup column

I'm trying to query a sharepoint list that contains lookup columns and taxonomyfields. When I use the $expand option I can't expand taxonomyfields, but when I use a camlquery i can't expand lookup ...
Marco's user avatar
  • 141
3 votes
2 answers
10k views

CAML query for filtering list view

I have a SharePoint list that I need to filter according to this: First of all, the items must be Booked by = Travel and Meeting Support and the Category should never be visible if they are Cancelled....
Jenny Fergéus's user avatar
3 votes
1 answer
4k views

How to get only the first x items starting at position y from a list, using CAML query?

In sharepoint 2010 client object model in javascript, I want to create a caml query, that can download items from a list. I have this part working, but I want to download only x items, not the whole ...
omega's user avatar
  • 2,150
2 votes
2 answers
531 views

Updating number column in SharePoint programmatically

This is my code which updates single line of text SPQuery query = new SPQuery(); query.Query = string.Concat("<Where><Eq>", "<FieldRef Name=" + txtColumnName.Text + "/>", ...
jatin's user avatar
  • 21
2 votes
2 answers
2k 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 ...
user7400's user avatar
  • 1,256
2 votes
1 answer
6k views

Client Object Model & CAML -> Getting Items of a specific view

I need some support as I am struggling to understand what is wrong with my code. I try to retrieve the data of a specific view. The line camlQuery.ViewXml = view.ViewQuery; throws an exception The ...
volker's user avatar
  • 23
2 votes
1 answer
3k views

Sharepoint 2013 .NET CSOM CamlQuery Join

I am unable to create a working query with join in my .net csom application. I was using this article: http://msdn.microsoft.com/en-us/library/ff798388.aspx here is my code: ClientContext context =...
user2791953's user avatar
2 votes
2 answers
2k views

How do I fetch the data from list present in root web of the root site collection?

We need to populate some data on an application page. The application page is present in the layouts folder and hence is accessible via the respective site URL. There are multiple site collections. ...
variable's user avatar
  • 4,466
2 votes
1 answer
378 views

Is querying a particular 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 ...
user8189's user avatar
  • 159
2 votes
4 answers
6k views

Web service based CAML query breaks 5,000 item limit

I have a CAML query of the form shown below which is called via the Sharepoint web service interface to search the entire Sharepoint site containing 600,000 documents looking for documents: <...
user16549's user avatar
2 votes
1 answer
14k views

SP Online - Get items from list(CAML) with JSOM

I want to get list item with caml query for SharePoint Hosted Add'in. Query will returned one item.. This is my code: function getUserData() { var employeeList = clientContext.get_site()....
Goshky's user avatar
  • 2,048
1 vote
3 answers
465 views

SharePoint - CAML query where check TextBox for existing "User Name"

I need to make query in SharePoint WebPart with VisualStudio. I have list "Employees" and need to check this list for existing UserName! <tr> <td class="auto-style1">...
Goshky's user avatar
  • 2,048
1 vote
0 answers
486 views

CSOM (HighTrust) SP2013 Group by aggregate giving duplicates

Hi I've been reading about group by in SharePoint 2013 CSOM from this article here. https://piyushksingh.com/2016/11/21/retrieve-grouped-listitems-sharepoint I've recently upgraded to 2013 and though ...
Richard   Housham's user avatar
1 vote
1 answer
12k views

Get all files under subfolder in Shared Documents list - SP Object Model

I am trying to get all files in a subfolder, in the Document Library "Shared Documents" in SP 2010. So the structure looks like http://sp2010site/sitename/shared documents/folder1/ http://sp2010site/...
Dave's user avatar
  • 13
1 vote
2 answers
12k views

CAML Query in Powershell Issues

I have a powershell script that I am running that executes a caml query to get some list items. The problem I am having is that whenever I execute this query in CAML Builder I am only getting 3 ...
BlueBird's user avatar
  • 1,850
1 vote
2 answers
1k 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.
omega's user avatar
  • 2,150
1 vote
3 answers
3k views

"float;#22.0000000000000" Number Returned From CAML Query

I'm running a CAML query to retrieve list items. Some of the columns retrieved contain decimal numbers. The problem is the values coming back from the query look like float;#22.0000000000000. I just ...
Submits's user avatar
  • 3,254
1 vote
3 answers
7k views

how to query multiple lists using CAML

I have requestID, date column in 4 different lists. I want to build a webpart which shows user requests of different types therefore i need to query multiple lists with column requestID and date. How ...
user342944's user avatar
1 vote
2 answers
2k views

CrossListQueryInfo\SPSiteDataQuery how to skip items with specific WebId?

Customer wants to see 10 news items from all webs on front page. Also customer wants to specify some news that we should skip. I am trying to do next thing: var id =1; <Neq><FieldRef ...
Ievgen's user avatar
  • 360
0 votes
1 answer
233 views

CAML is ordering by content type even though not specified

I have a library in SharePoint 2010. The library has folders, each item in the library, including the folder, are tagged with a number (separate column). When I do an 'OrderBy' the column, the ...
TeddyRuxpin's user avatar
0 votes
1 answer
3k views

Expanding ListViewByQuery Web Part stuck on "Working on it..."

I am using a ListViewByQuery in a custom web-part. If I set the CAML GroupBy to <GroupBy Collapse='FALSE'> (i.e. expanded), the webpart works fine. However, if I set it to <GroupBy Collapse='...
PeterX's user avatar
  • 1,020
0 votes
2 answers
765 views

CAML Query for Date Range - Not Working

Hey guys I am trying to get a list of items with a "Created" date range. The problem is that upon executing the query it seems to be completely ignoring the 5000 row limit. <View Scope='Recursive'...
Sharepointuser's user avatar
0 votes
1 answer
799 views

Display an Announcement List inside <div> tag

Here is my code to fetch Announcements List and display it as HTML table: <script type="text/javascript" src="/Test_Library/js/jquery-1.11.3.js"></script> <script type="text/javascript"...
Yash Saraiya's user avatar