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

0
votes
0answers
5 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 ...
1
vote
2answers
1k views

How to use SPServices search sql query - getting malformed query

I am using the SPServices javascript library to make a search request to sharepoint 2010 search. I am trying this query: queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' ...
0
votes
1answer
28 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
28 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 ...
0
votes
1answer
10 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 ...
1
vote
1answer
86 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, ...
3
votes
3answers
921 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 ...
1
vote
0answers
23 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 ...
0
votes
1answer
27 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
24 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 ...
1
vote
3answers
99 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 ...
0
votes
2answers
1k views

How to change a date format in CAML

I got a wrong date format to a CAML. I have got (yyyy-mm-dd) and must to be understand by CAML to the format(dd-mm-yyyy), how can I do this. I tried by String.Format("{0:yyyy-mm-dd}", dateISO1);, but ...
0
votes
1answer
58 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 ...
4
votes
2answers
2k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value ...
2
votes
1answer
810 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 ...
1
vote
1answer
33 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
25 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>" + ...
0
votes
1answer
821 views

Retrieve List items using CAML Query

I have a list which contains 3 columns -ID, TicketState and EndDate ID TicketState EndDate(DD-MM-YYYY) 1 Open 10/10/2012 2 Closed ...
2
votes
4answers
130 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 = ...
1
vote
1answer
1k views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
0
votes
0answers
29 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 ...
3
votes
1answer
894 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 ...
1
vote
1answer
27 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
4k 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?
1
vote
1answer
24 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, ...
2
votes
2answers
502 views

How do I get list items' attached files with CAML?

I'm retrieving items from a list. The list contains entries which have attachments. Can I modify my query to include the attachment URLs? What's the most efficient way of doing this? <View> ...
2
votes
1answer
236 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 ...
1
vote
3answers
54 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
31 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 ...
0
votes
1answer
48 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
33 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 ...
3
votes
1answer
1k 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 ...
1
vote
1answer
72 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(); ...
1
vote
1answer
63 views

Joining lists and accessing items fromt the joined list

I am working on a SharePoint Hosted app for SharePoint 2013 and I'm having real difficulty joining lists and accessing items from the joined list. In my app I build a CAML query in which two lists ...
4
votes
2answers
1k 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
1answer
156 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
25 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
33 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
24 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 ...
0
votes
1answer
20 views

CAMLQuery with multiple and/or

I want to be able to check if (1 = 1) AND (2=2 OR 3=3) this is the following code i've tried so far: "<View>" + "<Query>" + "<Where>" + "<And>" + "<Eq><FieldRef ...
1
vote
2answers
41 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 ...
0
votes
2answers
32 views

How can I get my CAML to only return non-hidden (user created) fields without specifing every field?

I can provide the ViewFields but I was wondering if there is a way to return all the user created fields (non-hidden ones) without having to do that. I know this works: <ViewFields> ...
1
vote
1answer
41 views

How to fetch highest value item from SharePoint list

I created a Custom List in developer Site. In that List I created a column called Totalsumma and added some numeric items like "324", "567" etc. How can I fetch the highest value from that column. ...
-1
votes
1answer
115 views

ItemUpdated Event Receiver how to change element from one list to secound list

I have got two lists. I must do synchronize this list, but one have got only 3 columns, and secound list have got 3 columns too, but have got more columns with hidden value. I done synchronizing ...
0
votes
1answer
45 views

CAML query for the last document uploaded by a particular user

I'm trying to write a query using the JSOM to get the last document uploaded to a document library by the current user. The reason I'm doing this is because I have an upload button on a form and need ...
0
votes
1answer
86 views

paging on list not working

I want to do paging on sharepoint list. I have below code which is giving error. var customlist; var allItems; var context = new SP.ClientContext.get_current(); var web = context.get_web(); var ...
0
votes
0answers
47 views

OrderBy in CAML query (using Camlex) cause an error

I'm developing a visual web-part for SharePoint 2010. I've to do a query with OrderBy clause. This is my code: if (ViewState["sortExp"] == null) { sortCol = "Column_x0020_A"; } else { ...
1
vote
0answers
52 views

SP2010 - Visual Web Part - Storing metadata in folders in document libraries

I want to store a number to folders to enforce ordering. I noticed these three pages Get Property Set Property Add Property And I want to know if it's possible to use these to add a number to the ...
0
votes
1answer
29 views

“0x80070003” error getting while I custom web part in SP2013

"0x80070003" error getting while I retrieve Only document from the document library In scop="Recursive all" in caml Query and that caml Query data pass in the Webpart...but while I Insert that custom ...
6
votes
3answers
187 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 ...