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

2
votes
1answer
29 views

Querying Standard Rendering Elements in CAML

Folks I'm looking to use the "standard rendering element" <PageUrl/> within a CAML query as per below: <Or> <Eq> <FieldRef Name="Webpage" /> <Value Type="...
0
votes
0answers
33 views

Providing a custom QueryOverride + Group items by <site> is not working together inside my Content Query web part

I am working on a Team site collection inside my SharePoint 2013. And I added a Content Query web part, and I define to Group the items by the Site:- And I got the following result which is correct,...
0
votes
0answers
45 views

CAML query is returning extra items that are not part of the filters

I am working on a Team site collection inside SharePoint server 2013. now inside the team site collection i have 5 subsites, and i want to return list items from the subsites that have the following ...
0
votes
0answers
17 views

Unable to Query Document Library on Lookup Column using CAML

I'm trying retrieve all items from a Document Library where a lookup column equals a certain value. The query returns no items for the given value but the same query with the same value returns items ...
1
vote
2answers
102 views

How to programmatically distinguish between simply uploaded documents (not check-out nor check-in) and check-in documents in SharePoint 2010?

I'm using SharePoint 2010 and I want to get the files that are not either checked out nor checked in. Meaning that I want to retrieve all documents that: - were uploaded in the Documents library ...
1
vote
1answer
69 views

Caml Query not applying to my list requests

I have a SharePoint Application that needs to data from lists to be inserted into elements. Here is the JavaScript: Collection.List.DropDown = function (listTitle, element) { //listTitle = "...
3
votes
1answer
267 views

How to filter items inside CQWP, based on Content type + People/ Group site column

I am working on a Team Site collection inside SharePoint 2013. and i want to display items that have specific content type + a people or group site column matches the login user. so i did the ...
1
vote
0answers
44 views

Query for SharePoint 2013 REST search

I have to site columns (column1, column2) that are also crawled by the search and available as Crawled properties, so I can use them as filters in REST query as well. I'm now trying to build the REST ...
1
vote
1answer
260 views

How to specify a CAML Query to return items that have any of two site columns?

I want to define a query to return items that satisfy the following :- if any item have a CT & login user = site column so i wrote the following :- <property name="QueryOverride" type="...
1
vote
1answer
104 views

Query a SPList with managed metadata column with CAML including child terms

I have a SharePoint list which has a managed metadata column. This is bound to my term store which look like as following: Cars Mercedes S600 CL65 G BMW 5 6 7 X5 Maybach ... Bentley I ...
1
vote
2answers
156 views

Create a dynamic WHERE clause with LINQ to SharePoint

I have a custom application where the user can select multiple (13) parameters to select data from a SharePoint list. To achieve this, I want to use LINQ to query this data from SharePoint. The ...
2
votes
0answers
33 views

Does the total amount of lookups affect performance in a CAML query that has less than 8 lookup columns?

I have a large library with 12 lookup columns, and while I only use 6 of these columns when I retrieve data from this library (in a CAML query), the retrieval process often takes 20-30 seconds. Would ...
5
votes
1answer
175 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' /&...
0
votes
2answers
135 views

Get all years of date field in document library programmatically

I have a library with lots of documents. Now I need to get all years of the documents for a custom navigation programmatically. Input: Many documents in a library that all have a custom ContentType, ...
0
votes
1answer
318 views

CAML query for 'FileRef' does not return relative path

I'm having trouble retrieving the relative path of a file using CAML: http://[siteURL]/_api/web/lists/GetByTitle('test')/GetItems(query=@v1)?@v1={"ViewXml":"<View><ViewFields><FieldRef%...
0
votes
0answers
38 views

Remove Random Characters

After we upgraded to 2013 SharePoint, random characters are added to lookup fields when I pull using spservices. Ex: AAA is one of many values in a list called Vendors. I have another list called ...
4
votes
1answer
152 views

CSOM combining CAML query with method call (GetWOPIFrameUrl) or two queries on the same instance

I am trying to optimize some code that calls the GetWOPIFrameUrl method for list items that were retrieved using a CAML query. The original code executed the CAML query to get the list of items, then ...
0
votes
1answer
74 views

Group by field UserMulti in view (Request CAML)

I have a view where I have to do a group by a field UserMulti , I did the following: <Query> <GroupBy Collapse="TRUE" GroupLimit="30"> <FieldRef Name="Utilisateur_Auteur"...
0
votes
0answers
107 views

Multiple Inner Joins CAML query

I'm trying to convert the following SQL statement to a CAML query: SELECT t.Id, t.Name, t.CustomerId FROM Ticket AS t INNER JOIN Customer AS ...
3
votes
0answers
53 views

<In> overrides everything else in SharePoint CAML query

I'm writing a CAML query for SharePoint. The list contains a term set field. I want to get all list items having specific terms, plus items where no term is set. My query contains this: <Or> ...
0
votes
1answer
146 views

Equivalent of Rest $filter in CSOM Caml query

I am trying to convert my rest implementation to CSOM. Rest API for the same : _api/web/sitegroups?$Filter=LoginName%20eq%20'Test_Grp' Unable to find an equivalent for $filter in lambda expressions. ...
0
votes
1answer
213 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"...
-2
votes
1answer
127 views

camlquery to get all link to document in library

As explian in the title i need a camlquery to retrieve all "link to document" inside a library. Are there a way to do this? For know in my camlquery i'm looking in fileleafref field if contains ....
1
vote
0answers
47 views

SPServices new item return expanded user information

I'm creating new discussion in a list using SPServices, like this: $().SPServices({ operation: "UpdateListItems", batchCmd: "New", listName: discListName, updates: "<Batch OnError='...
0
votes
1answer
64 views

CAML Query and statement not working

I've been working on this query for a while now and I can't get it to return any rows. It was working before I added in the content between and added the and statement. camlQuery.set_viewXml("<...
1
vote
1answer
497 views

How to call SharePoint Rest Service with CAML and Lookup column [duplicate]

I am trying to query sharepoint list which is having Lookup columns. So to do so I am using below JavaScript function function getDataWithCaml(oDataUrl, caml) { var requestData = { "...
0
votes
1answer
113 views

The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested

I am getting below error on the second request. Strange thing is its not occurring on first request. The collection has not been initialized. It has not been requested or the request has not been ...
0
votes
3answers
138 views

CAML Lookup - get different value from lookup list using query

Say I have two lists: Support Pack ID : 1, SupportPackTemplateLookup:(ID#OtherValue), IsActive : True Support Pack Template: ID : 1, OtherValue: x, SuppType: 10 hr support pack ID : 2, OtherValue:...
1
vote
0answers
48 views

CAML, how to get Fields which are having Unique condition

I am trying to get the field info of a list and I need to also know whether the field has Enforce unique values: as true. IEnumerable<List> lists = clientContext.LoadQuery( lists.Include(list =&...
3
votes
4answers
741 views

Display Announcements List in HTML Table on a SharePoint 2010

Consider this as my code for displaying Announcements list in a site page on my SharePoint 2010 site: <html> <head> <script type="text/javascript" src="/Test_Library/js/jquery-1.9.1....
0
votes
1answer
510 views

CAML Query is throwing value does not fall within the expected range

I have the following CAML: ViewXml = @"<View> <Query><Where><AND> <Eq><FieldRef Name=""Status""></FieldRef><Value Type=...
1
vote
1answer
229 views

Javascript CAML query javascript [Object Object]

I made a CAML query with the "CamlJS Console" Addon for Chrome. I joned 2 List to 1 relation list and my output from the query is always one item called "Kategorie" (category in english). I want to ...
0
votes
0answers
38 views

Two choice fields to select a unique list submission then edit the result

Goal: I am trying to filter against two choice parameters in order to find the unique ID of the item shared between the two. I would then open that unique item entry, edit it, and overwrite it back to ...
0
votes
0answers
68 views

SPQuery not returning expected results

I am trying to filter a SPListItemCollection with CAML but I don't get the results I want. Here is my code: query.Query = "<Eq><FieldRef Name=\"Title\" /><Value Type=\"Text\">" + ...
0
votes
1answer
165 views

Filter sharepoint 2010 list view webpart with “date less than” condition

please help if it is possible to filter a sharepoint List View Webpart with a condition "date column less than selected date". With Data View web part it is possible. I also know that jQuery is ...
0
votes
1answer
44 views

DVWP does not honor CalendarDate in SharePoint:SPDataSource SelectCommand

I've been able to use the below code to get a DVWP to return appointments for the current month, including recurrences. However, no matter what I try, I cannot get it to honor the CurrentDate option ...
0
votes
1answer
578 views

CAML query using DateRangesOverlap does not respect CalendarDate when using year

I've seen numerous articles on how to get recurring events for the year, month, week or day. However, it appears that when using <Year /> the CalendarDate in QueryOptions is ignored. In the ...
0
votes
1answer
66 views

CAML query with In operator

I'm trying to use CAML query with In operator since it's easyer to build then Or conditions. Here is my CAML <View Scope="RecursiveAll"> <Query> <Where> <In> <FieldRef ...
0
votes
1answer
75 views

Completely remove field from Content Type?

I recently tried to delete a Multi-line Text Field from a custom Content Type. I then attempted to delete this field, and re-create it as a Single line of text under the same field name. After ...
2
votes
1answer
138 views

How do I use IN in a CAML query?

I have a CAML query where I want to check if a field's "status" is equal to "Ordered" or "Approved". I've located the documentation for IN in CAML but it's not very specific. I've tried two queries, ...
0
votes
1answer
145 views

Order Discussion Board by latest reply date else order by created date

I am trying to order a discussion list by the latest reply date, else if it doesn't have a reply order it by the thread created date. This is what I have: SPList discussionList = web.Lists["...
0
votes
1answer
251 views

CAML Query for DateTime field with “In” element

I have a dynamic CAML builder which I built to generate queries like the following: <View Scope="RecursiveAll"> <ViewFields> <FieldRef Name="Editor" /> <FieldRef Name="...
0
votes
1answer
581 views

Using SPServices operation 'GetListItems' how to construct a CAML Query joining two lists?

Using SP2013 - JavaScript - $().SPServices() - operation 'GetListItems' - how would I construct a CAML query that will join two lists where list 'A' has a reference to list 'B' specifically having a ...
1
vote
2answers
2k views

Help with Complex CAML Query - Multiple OR Conditions

I need some assistance with a complex CAML query. I can get parts of it working but cannot get all of it working together. What I need in laymans terms is this: Where Country = US AND Status ...
0
votes
0answers
280 views

Error : “Value does not fall within the expected range.” while using JOIN in CAML query

Here is my code: SPList list = web.Lists["List1"]; SPQuery query = new SPQuery(); query.Query = @"<Where>" + "<And>" + "<Eq>" + ...
1
vote
0answers
34 views

Is there any way to implement numbered pagination instead of PREV | NEXT using JSOM without using search

I'm wondering if there any way to implement Numbered pagination while retrieving items from a list like "PREV 1,2,3..NEXT" instead of just having "prev | next". I followed this code example MSDN and ...
2
votes
4answers
3k views

Caml Query to return items created by logged in user

Using Javascript CSOM and want to return items created by logged in user, but the code below returns all items. Could someone advise? var camlQuery = new SP.CamlQuery(); var specifier = "<Eq>&...
0
votes
0answers
133 views

return empty fields using lists.asmx and GetListItems

I have a list with 3 fields. I'm able to get the rows but in the returned XML if one of the fields is empty then the field is not in the XML. Is there anyway to get all fields I specify in ViewFields ...
1
vote
1answer
161 views

CAML query to check overlapping DateTime not working

I need to check an SPList if it contains Activities that have overlapping DateTime values. An Activity is a type which contains: Date on which the activity was done (ActivityDate) Start time of ...
1
vote
1answer
376 views

GetItems from SPList case sensitive

I have troubles with CAML Query and GetItems method from SPList. I get a SPList from web context: SPList docTypeList = _web.GetList(string.Format("{0}{1}", web.ServerRelativeUrl, ...