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
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 ...
Florian Wolters's user avatar
0 votes
1 answer
106 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 ...
Adam's user avatar
  • 103
1 vote
1 answer
312 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 (...
test_account's user avatar
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'&...
Pete Whelan's user avatar
0 votes
1 answer
410 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&...
Pete Whelan's user avatar
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'/> <...
Des's user avatar
  • 1
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</...
Des's user avatar
  • 1
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 ...
Masoud's user avatar
  • 103
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&...
John John's user avatar
0 votes
1 answer
469 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><...
Ashok 's user avatar
  • 59
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 ...
Carl Verret's user avatar
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&...
Venkat's user avatar
  • 25
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 ...
NewToSharepoint's user avatar
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 ...
Amber's user avatar
  • 3
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. ...
Amber's user avatar
  • 3
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....
John John's user avatar
1 vote
1 answer
308 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'>&...
John John's user avatar
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><...
Priya's user avatar
  • 39
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, ...
f_gulay's user avatar
  • 651
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 ...
dns_nx's user avatar
  • 181
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 ...
Paul Vu's user avatar
  • 111
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 ...
John John's user avatar
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 ...
Marta's user avatar
  • 1
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 ...
Thermi2000's user avatar
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>&...
Lance Bitner's user avatar
1 vote
2 answers
2k views

How to read Retention Label applied column using REST API or CAML query

I am trying to read Retention Label applied using REST API but unable to read tried both values, tried CAML as well but not getting this field, can we read using API or is not possible? _api/web/...
kumar's user avatar
  • 139
0 votes
1 answer
212 views

Unable to add item with a lookup column value using CAML query

I have a PowerShell script that add's a new item to a list which has 2 lookup columns to different lists first part of the script add's the item with the correct lookup value: $ListLookupitem = $...
John Smith's user avatar
0 votes
1 answer
27 views

CamlQuery Lookup not correct

I need to display the elements in Column "NetworkNodes" only SRV1 and SRV3 in Lookup, how to write correctly? The remaining elements of the SRV are not needed. Doesn't work like that: Query =...
Mikhail Zhuikov's user avatar
0 votes
1 answer
397 views

CAML in Powershell within 2 dates

I've been tweaking my code with various solutions discovered here and elsewhere with no luck so I figured its time to ask for help. I'm using Posh ver. 4.0 on SP 2013 Enterprise on-premises. I have a ...
Arale's user avatar
  • 61
0 votes
1 answer
22 views

Unable to get the pages which have their calcualted date.time field equal today using CAML

I am working on an online SharePoint site collection, where I have a calculated column named "ExpiryDate" of type Datetime, and I want to get all the pages which have their expiry date equal today, i ...
John John's user avatar
0 votes
1 answer
3k views

CAML query using a Choice field is not working

I have the following CAML query inside our SharePoint online site collection, to get all the list items which have a choice field named CustomerOrderAlert = No, as follow:- List ...
John John's user avatar
1 vote
2 answers
3k views

CSOM Caml query get only root level folders in document library(paginated response)

Try to ignore some of the ugly if statements :D. I am very new to CSOM and caml. Is it possible to write Caml statement that returns the Folders in the Root of the document library only? Apologies ...
Andrew Gerstner's user avatar
0 votes
2 answers
2k views

Sharepoint Online Csom: Getting around 5000 view limit in document library in a paginated response

Let me preface this with, I begged them to let me re-organize the files a lot of different ways but they like looking at all files in one place. I am working on cleaning out a large Document Library ...
Andrew Gerstner's user avatar
0 votes
1 answer
3k views

Highlighted Content Custom Query Filtering

I am trying to write a simple query to filter highlighted content and can't figure out the CAML to accomplish it. The out of the box filter option is returning results in an odd order, and it needs ...
Bravo2xray's user avatar
1 vote
1 answer
31 views

CAML for Library within Library

I need help writing a CAML. Unfortunately, I have little experience with this and can't seem to formulate a query that works. I'm trying to show a library that is within another document library. I ...
Sandra's user avatar
  • 11
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" ...
bnerd's user avatar
  • 26
1 vote
1 answer
328 views

Join two Lists with Where Condition in a Joined List

I am trying to create the Caml query for the following Scenario: I have two Lists: DocumentApprovalRequest DocumentApprovalComments Both the Lists has the column "DocumentNumber", I want to join ...
Alina Anjum's user avatar
1 vote
1 answer
53 views

retrieve files from sharepoint library failed after few files

Below is my code, it worked with too files and when ExecuteQuery load the third one, an error is timeout. no other error message got . ListItemCollection items = list.GetItems(CamlQuery....
Tom Ping's user avatar
1 vote
2 answers
592 views

Deleting element from list using CAML Query not working (deleteObject of undefined)

I want to delete a list element using CAML Query. The element has the value 55 in the column CorrespondingListID. This is the function I use: deleteFromHistory: function(){ console.log("...
user1234567890's user avatar
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
Abdul Karim Dorman's user avatar
0 votes
1 answer
454 views

CAML query return "Value does not fall within the expected range"

I have the following CAML query to iterate over a large SharePoint document library :- do { CamlQuery camlQuery6 = new CamlQuery(); // The RowLimit tells SharePoint to only scan ...
John John's user avatar
0 votes
1 answer
2k views

Using "<Where><BeginsWith><FieldRef Name=\"FileDirRef\" />" Rreturn Error:- The attempted operation is prohibited because it exceeds the list view [duplicate]

I have the following code inside my remote event reciever, the code will get all the folders and files under a specific folder:- CamlQuery camlQuery6 = new CamlQuery(); camlQuery6 = new CamlQuery()...
John John's user avatar
1 vote
1 answer
211 views

Is there a way to select files that matches a certain regex with CAML?

$CAMLQuery = "<View Scope='RecursiveAll'> <Query> <Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='Text'>bad_file</Value></Eq></...
Sayaman's user avatar
  • 197
0 votes
1 answer
139 views

Can i get all the folders and files (under all level) inside a main folder using CAML

I have the following CAML query where i am trying to get all the files and folders that are directly and indirectly added to the folder named FolderA:- camlQuery6.ViewXml = "<View Scope=\"...
John John's user avatar
1 vote
0 answers
134 views

Sharepoint Modern - Highlighted Contents

Ive been searching for awhile for this. Is anyone here successfully create a filter in Modern Sharepoint To show Pages that Logged-in User Liked? the modern sharepoint can query using KQL or CAML ...
Christian Reyes's user avatar
0 votes
2 answers
2k views

CAML query which contain a lookup field and single line of text is returning wrong results

I have a list named "Security Groups" inside my sharepoint online site, which contain a lookup field named Templates and a single line of text named "Folder", with the following sample data:- and i ...
John John's user avatar
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='...
user89072's user avatar
0 votes
1 answer
547 views

Getting and setting multiple items from a Sharepoint list using CAML query?

I have a SharePoint list Catalog. Using camlQuery I can get a list item value called Price. With the following code I get the Price value of the list element which has the ID 5 and store it in a ...
user1234567890's user avatar
0 votes
1 answer
241 views

Correct camlQuery to retrieve list item value via JavaScript and setting that value in another list

I have two lists: Catalog and Position. I want to retrieve the value of a list item in Catalogand use it for the value of a list item in Position. To get the list items' value Title, I used // Get ...
user1234567890's user avatar
1 vote
0 answers
401 views

pnp.js - Join 2 sharepoint lists using camlquery

I am facing issue with joining 2 sharepoint lists using pnp.js. I have 2 lists, the first one named "Phasen" have 2 columns, Title, Wow. The second list named "Projects", have 2 cloumns - Title, ...
Amit Ghodke's user avatar

1
2 3 4 5
11