Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
2 votes
1 answer
1k views

Sharepoint Online REST api CAML query not returning file related columns

I'm trying to query a document list from a SharePoint Online server using REST API. I have to use CAML, otherwise filtering is not possible on the taxonomy field as far as I know. Below is the ...
6 votes
1 answer
2k 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
1 answer
2k views

Add filter and pagination to CAML query

I'm developing a visual web part for Sharepoint 2010. I would display all documents from a specific DL, but this DL contains more than 7000 items. So I would like to add a pagination (show only 20 ...
1 vote
2 answers
1k views

Filter and Sort the List with Caml Query

We are required to display the list data based on below 3 conditions for the based on 3 columns (Customer Category, Test Type ,Exercise Result) and sort with column (stage Plan) . 1. Customer ...
0 votes
2 answers
2k views

SharePoint CSOM list group by and filter

I have a list with columns "fruit" and "ripeness". Using csom, how can I return "Banana" where Yellow count >= 3? ClientContext ctx = new ClientContext("https://sharepoint.blah.com"); List list = ctx....
0 votes
0 answers
8 views

How to properly filter by custom metadata (GetItems with POST does not behave as Items with GET) using REST API v1?

I'd like to search for items in a SharePoint list by their custom metadata values or in other words filter a SharePoint list by specifying values for custom metadata fields. Searching the internet two ...
1 vote
1 answer
1k views

SharePoint - Document Library - File Size Units?

I am fetching file properties from a document library using below query(I am using c#,csom) camlQuery.ViewXml = @"<View Scope='RecursiveAll'> <Query> ...
0 votes
1 answer
1k views

Can I reach the lookup column's data with CAML query?

I want to reach the list's data. There is lookup column. I am using CAML query. But when I create a query with CAML, I am seeing look up columns like Microsoft.SharePoint.Client.FieldLookupValue[].I ...
0 votes
1 answer
3k views

Recursive CAML query

I would like to search items between two dates in a DocumentLibrary. The query find the files at root just right. However the query doesn't seem to be considering files in folders. Here is my attempt ...
0 votes
1 answer
3k views

SharePoint REST API CAML Query error : “Every two elements in an array and properties of an object must be separated by commas."

While quering with the CAML query in the SharePoint REST API throws following error. { "error": { "code": "-1, Microsoft.Data.OData.ODataException", "message": { "...
0 votes
2 answers
1k views

SP.CamlQuery().set_viewXml() returns undefined

I am trying to run a CAML query to sort through some data. Once the page finishes loading i do not get the results i want. I checked the functions and it turns out that for some reason, my CAML query ...
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: <...
1 vote
1 answer
7k 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
3 answers
2k views

How to count number of days from SharePoint list?

How to count number of days between two dates from SharePoint list using CAML query/JavaScript? Thanks
5 votes
4 answers
27k views

CAML query using 'contains'

I have a CAML query <Query><Where><Or>"+ "<Eq><FieldRef Name='UserName' /><Value Type='User'>" + User.Name + "</Value></Eq>"+ ...
0 votes
3 answers
1k 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
1 answer
3k views

Highlighted Content custom query to find subdirectory contents

I'm trying to filter the results of the Highlighted Content web part a bit more than is available in their pre-built filters. I'm in Office 365 (corporate) and my SharePoint page is in the same group ...
0 votes
1 answer
107 views

SharePoint CAML Query to get all folders that have a value for a specific field and were modified within the last five days

I am attempting to get ALL folders that contain a value for the ProjectNumber field and were modified within the last five days. This query only works when I remove the modified condition. Otherwise ...
1 vote
1 answer
315 views

SharePoint CAML: Search Subfolder and PDF File Type

In a Highligthed Content web part, I want only PDF files to display from a certain document library's subfolder. I have the following CAML - it filters all documents from the indicated subfolder (...
0 votes
1 answer
847 views

Query a single line of text filed using CAML <Contain> will return all items

I have a list inside SharePoint online site collection. the list contain a field named Processed which is of type single line of text, and only one item have a value inside this field while the other ...
2 votes
1 answer
38 views

I want to get list where invoice _category is service please help? [closed]

I want to get the list items where invoice _category is equal to "Service". Please help? Current code: camelQuery.Viewxml = "<View><Query> <Where><Eq><FieldRef Name='...
0 votes
0 answers
23 views

CAML with 'And' gives no results?

I am pulling results from a SharePoint Online list without problem with this... <View><Query><Where><Eq><FieldRef Name='department'></FieldRef><Value Type='Text'&...
0 votes
1 answer
411 views

CAML Query when using Or fails giving "Cannot complete this action"

I am creating an SPFX web part which queries a list in SharePoint Online This works fine: camlQuery = "<Query><OrderBy><FieldRef Name='LinkTitle' Ascending='TRUE' /></OrderBy&...
0 votes
1 answer
29 views

CAML Query seems to ignore "Type" in Value tag

When querying, it seems to not matter what I write at "Type" as soon as I write something. For example <In> <FieldRef Name='Industry'/> <...
0 votes
1 answer
50 views

CAML Query IN operator not returning the desired results. If I change one Choice column, it stops to appear!

I've a query that goes like this: <In> <FieldRef Name='Industry'/> <Values> <Value Type='Text'>Insurance</...
0 votes
0 answers
35 views

how to get maximum of another column for a grouped column

in my SharePoint list I have below columns and meta data: Doc No       Rev Doc-0001     00 Doc-0001     01 Doc-0001     02 Doc-0002     00 Doc-0002     01 Now I want below to result in ...
0 votes
1 answer
39 views

Can we define NOT IN inside CAML Query

I have this Power Shell script which work on SharePoint 2013 on-premises: $NewHireList = $spSourceWeb.Lists["ONB New Hire"] $NewHireItem = $NewHireList.Items | Where {$_["Candidate ID&...
0 votes
1 answer
1k views

How can you get results from a SharePoint document library (with folder and child items) in a SSRS report?

I have a SSRS report that uses a SharePoint document library as a data source. The issue is that the list has folder and in those folders are child items. The dataset is only returning items from the ...
0 votes
1 answer
474 views

CAML query to get all items which are modified or created today?

Can anyone help me with CAML query where items are created or modified today. Trying below where I am excluding one specific item and getting modified item today but its not working: <View><...
0 votes
1 answer
87 views

'See all' link with custom CAML query

With Sharepoint online (highlighted content) : Using a working CAML Query with Rowlimit, I've lost the "see all" link that is showed by default when I display without the query. As soon as ...
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?
4 votes
1 answer
15k views

CAML Query to retrieve list item by title

I'm trying to query for only this the item called Test1. I'm using this caml query but I'm returning all items in the list for some reason. private static int GetlookUpId(List hrLookupList, string ...
0 votes
1 answer
84 views

CAML multiple AND Conditions

The CAML query below didn't work for me. Any help? $viewQuery = "<Where><And><Eq><FieldRef Name='PP'/><Value Type='Integer'><UserID Type='Integer'/></Value&...
3 votes
2 answers
6k 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?
6 votes
4 answers
24k 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>&...
1 vote
2 answers
3k views

Sharepoint Online CAML query very large list checked out files, csom powershell or c#

I have poured over a ton of posts and code and none seem to work with checked out files and really large lists. I am newish to sharepoint, especially online. I moved a doc repo up there for testing ...
0 votes
1 answer
24 views

T-SQL to CAML - I wonder what's missing in the CAML (T-SQL works)

I have this SQL query and it works perfectly. However, when I try to create a similar CAML it doesn't work. Is there a tool that can convert SQL to CAML. or can someone please help. Here is the ...
0 votes
2 answers
1k views

CAML Query with multiple conditions

I'm trying to add another OR condition in my CAML Query below, but nothing seems to be working. Can someone help? Please see attached picture of the library. I am trying to get the highlighted data. ...
0 votes
2 answers
884 views

CAML query seems to be ignored

My CAML query seems to be ignored as I'm getting the same result no matter which dates I send. I found an JavaScript example which seemed to work fine until I started to edit my query function ...
0 votes
0 answers
171 views

Executing a CAML query will return this error: "Specified argument was out of the range of valid values. Parameter name: index"

I have the following code inside our console application, to loop through a list of number and query the SharePoint list which is inside a modern communication site: foreach (var r in allrequests....
1 vote
1 answer
309 views

CAML query is returning all the list items

I have the following CAML query CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<Query><Where><Eq><FieldRef Name='RiskRequestID'/><Value Type='Text'>&...
0 votes
2 answers
277 views

Caml Query Date condition not working

In the below query after adding date condition the query returns error - Cannot complete this action. Please try again.. "<View><Query><Where><And><Eq><...
1 vote
0 answers
502 views

Using CAML to filter documents by Querystring on SharePoint Online modern pages

I need to create a SharePoint modern page which will display list of documents filtered using the value in the querystring (eg .../Documents.aspx?param=2). I have tried using "Highlighted content" ...
0 votes
1 answer
27 views

How can i store camlquery results to filter and delete that i don't need?

I just want to change the result of camlquery. But i dont know how to store them and filter it. The query is now turning many values that i dont need. I want to drop them and show them in a view. So, ...
0 votes
1 answer
47 views

List view threshold - Why is querying with key filters still possible without having an indexed field

I read a lot about the list view threshold topic, so I know, that it should not be increased, if you have large list. In short, as far as I read, it is recommended to create an index on a column and ...
0 votes
1 answer
58 views

How to query SharePoint items that contain one or more text values CAML?

I want to query for SharePoint items that contain at least one or more specified texts. For example, I have a field called "Pets." A SharePoint item would have a value that looks something ...
1 vote
1 answer
373 views

CAML query to get all items which are 2 days from today

I have a site column of type Date and Time as follow:- Now i want to query and get all items which have their Approve By exactly 2 days before Today. so let say today is 24 Sept 2020 then the query ...
0 votes
4 answers
220 views

Exceeds Threshold

When I use a query with where clause, my app throw this exception: "ExceptionMessage":"The attempted operation is prohibited because it exceeds the list view threshold enforced by the ...
0 votes
0 answers
35 views

Current user filter does not work for "migrated" users

we are using a Sharepoint list in which employees can capture their expenses. We are using the [Me] filter on "Author" column to let the user only see his own entries. Due to organizational ...
1 vote
1 answer
106 views

CAMLQuery is not rendering title item from the list

Here is the list (please note 'Full Name' column has been changed to 'FullName' since I took this shot: Here is the CAMLQuery: $(document).ready(function() { var camlQuery = "<View>&...

1
2 3 4 5
11