Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take 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

When uploading a large directory to sharepoint, api CAML queries do not seem to find the data?

I drag-and-dropped a folder into a document library in SharePoint 2019 on prem. The instance is a test instance, but has decent server size. It was pretty big, 30k files, 5k folders. max nesting is ...
user avatar
0 votes
1 answer
23 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&...
user avatar
  • 25
1 vote
1 answer
128 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 ...
user avatar
0 votes
0 answers
45 views

Microsoft.SharePoint.Client.ServerException: 'Value does not fall within the expected range.'

I am getting an error when executing below code: ListItemCollection listItems = documentList.GetItems(camlQuery); _clientContext.Load(listItems, items => items.Include( item =&...
user avatar
  • 1
0 votes
1 answer
13 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 ...
user avatar
  • 3
0 votes
2 answers
110 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. ...
user avatar
  • 3
0 votes
0 answers
28 views

Working CAML Query now returns 0 items

I have Windows scheduler running a job every week. 1)The job picks up items from a SharePoint Library filtered by CAML query 2)Updates system based on a column's value. Recently; it has been found ...
user avatar
0 votes
0 answers
48 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....
user avatar
  • 2,234
1 vote
1 answer
59 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'>&...
user avatar
  • 2,234
0 votes
2 answers
60 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><...
user avatar
  • 39
0 votes
1 answer
23 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, ...
user avatar
  • 641
0 votes
1 answer
42 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 ...
user avatar
  • 179
0 votes
1 answer
27 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 ...
user avatar
  • 111
1 vote
1 answer
104 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 ...
user avatar
0 votes
4 answers
42 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 ...
user avatar
  • 1
0 votes
0 answers
32 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 ...
user avatar
1 vote
1 answer
66 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>&...
user avatar
1 vote
2 answers
629 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/...
user avatar
  • 87
0 votes
1 answer
90 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 = $...
user avatar
0 votes
1 answer
26 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 =...
user avatar
  • 614
0 votes
1 answer
124 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 ...
user avatar
  • 61
0 votes
1 answer
14 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 ...
user avatar
0 votes
1 answer
951 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 ...
user avatar
1 vote
2 answers
864 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 ...
user avatar
0 votes
2 answers
811 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 ...
user avatar
0 votes
1 answer
2k 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 ...
user avatar
1 vote
1 answer
14 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 ...
user avatar
  • 11
1 vote
0 answers
367 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" ...
user avatar
  • 26
1 vote
1 answer
169 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 ...
user avatar
1 vote
1 answer
46 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....
user avatar
1 vote
2 answers
355 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("...
user avatar
0 votes
3 answers
1k 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
user avatar
0 votes
1 answer
181 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 ...
user avatar
0 votes
1 answer
653 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()...
user avatar
1 vote
1 answer
77 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></...
user avatar
  • 75
0 votes
1 answer
63 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=\"...
user avatar
1 vote
0 answers
103 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 ...
user avatar
0 votes
2 answers
782 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 ...
user avatar
2 votes
1 answer
36 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='...
user avatar
0 votes
1 answer
364 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 ...
user avatar
0 votes
1 answer
21 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 ...
user avatar
1 vote
0 answers
236 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, ...
user avatar
0 votes
1 answer
369 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 ...
user avatar
1 vote
2 answers
1k views

Does CAML query support Does Not Contain

I am working on a console application to integrate with SharePoint Online site collection. and I want a way to get all items that do not contain the word "fail" and do not contain the word "success", ...
user avatar
0 votes
0 answers
60 views

SPList returns no result if CAML query is modified or removed

I have a SharePoint PowerShell script which gets items from a list. I am changing the CAML query for different output. However, upon changing or removing the CAML query, the method of list.GetItems()...
user avatar
  • 51
1 vote
1 answer
74 views

How to speed up file reading using SharePoint CSOM?

I have created a function using the SharePoint CSOM to extract all files within a Document Collection (List) using the below code however it takes over 5 minutes to get a list of 3671 files. Is it ...
user avatar
  • 113
0 votes
1 answer
176 views

If Else in the CAML Append Method

I have been trying to do an if else condition in the append method however for some reason it's not reading the condition. Here is the code. Towards the bottom I want to show signNow if the list ...
user avatar
  • 307
0 votes
1 answer
180 views

CAML - Getting the URL's ID for the Where Clause

Is there a way to get the ID from the SPGetCurrentSite? I want to use in my Where clause for my CAML Statement/ID field in the SharePoint list item. I'm new to CAML and I was using the below but I'm ...
user avatar
  • 307
0 votes
2 answers
44 views

how to get this CAML query to work

I have a javascript and i can't get the CAML or listitems. //http://vadimtabakman.com/nintex-forms-multilingual-form.aspx NWF$(document).ready(function () { var language = NWF$('#' + ...
user avatar
1 vote
1 answer
24 views

Combine 3 queries for different lists into one

I am building API for client side apps. There are 3 API requests for 3 different lists as following: tasksQuery = string.Format(@"<Where><And><Geq><FieldRef Name='Created' />&...
user avatar

1
2 3 4 5
11