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

1
vote
1answer
92 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
141 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
31 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
162 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
122 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
269 views

CAML query for 'FileRef' does not return relative path

I'm having trouble retrieving the relative path of a file using CAML: ...
0
votes
0answers
36 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
135 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
71 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 ...
0
votes
0answers
100 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
52 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
134 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
193 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 ...
-2
votes
1answer
118 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
41 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 ...
0
votes
1answer
56 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. ...
1
vote
1answer
449 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
85 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
126 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, ...
1
vote
0answers
42 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 ...
2
votes
4answers
694 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" ...
0
votes
1answer
430 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 ...
1
vote
1answer
206 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
57 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
154 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
42 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
456 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
64 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
72 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
135 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
133 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 = ...
0
votes
1answer
225 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 ...
0
votes
1answer
528 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
1answer
1k 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
253 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
31 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
2k 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 = ...
0
votes
0answers
118 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
155 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
300 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, ...
1
vote
3answers
287 views

CAML retrieve only the latest of each value in a column

(Sorry if the title isn't clear I'm not really sure how to phrase it in one question) Situation: I have a list in sharepoint containing some evaluation of different teams in a company with at least ...
0
votes
1answer
49 views

CAML Query with many conditions

I would like to know, is there a way to build such a CAML Query, or is this nonsense: I have a SharePoint List with two ContentTypes: ServiceGroup and Services. The Fields are Title ServiceGroup ...
1
vote
1answer
515 views

Caml Query on calendar to get the next x events (including recurring)

So far I'm able to get the next x events (without recurring events). Code: private SPListItemCollection GetNextEvents(SPList eventCalendar) { DateTime currentDateTime = DateTime.Now; ...
0
votes
0answers
59 views

How to use CAML with CSOM for getting users in SP2013?

I want to get all the users in CSOM SP 2013 in javascript, but I don't want all users. I want to filter them by CAML. This is what I have so far which filters by first name is Tom, but the CAML is not ...
1
vote
1answer
665 views

CAML query for current date

I want to get all items from the list, which has a start date from date.now or later in time. This is what I thought would work: var dateNow = Date.now(); var camlQuery = new SP.CamlQuery(); ...
2
votes
1answer
294 views

CAML query filtering is not working

I've googled that it can be in case when query is not well-formed. But I'm verifying it for several hours and didn't find any mistake. Problem is common: query doesn't filters and returns all data. ...
0
votes
1answer
44 views

How to check if managed metadata has a keyword in CAML query?

I want to make a caml query that checks if a managed metadata column (which is a list of phrases) contains a certain phrase. I have this which seems to work, but the problem is it does a substring ...
0
votes
1answer
46 views

build caml query for multiple AND & OR

how to build caml query for following condition. All the fields all from single list. select empid, ename, salary from emp where empid=(100 or 107 or 99 or 103 or 105) and deptno=10 and mgrId=23
0
votes
1answer
91 views

How to filter document libraries using CAML query?

In my powershell script, I get all lists, then loop through and filter based on if its a document library and if its a certain content type, but I want to do this through CAML. This is the loop logic ...