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
16 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
20 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
20 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'/> <...
  • 1
0 votes
1 answer
21 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</...
  • 1
0 votes
0 answers
28 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 ...
  • 103
0 votes
1 answer
9 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
78 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><...
  • 47
0 votes
1 answer
57 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 ...
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 ...
0 votes
1 answer
46 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&...
  • 25
1 vote
1 answer
1k 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
22 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 ...
  • 3
0 votes
2 answers
550 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. ...
  • 3
0 votes
0 answers
113 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
188 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
121 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><...
  • 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, ...
  • 641
0 votes
1 answer
45 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 ...
  • 179
0 votes
1 answer
35 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 ...
  • 111
1 vote
1 answer
236 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
102 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 ...
  • 1
0 votes
0 answers
34 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
86 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 vote
2 answers
933 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/...
  • 119
0 votes
1 answer
138 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 = $...
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 =...
  • 614
0 votes
1 answer
224 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 ...
  • 61
0 votes
1 answer
16 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 ...
0 votes
1 answer
2k 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 ...
1 vote
2 answers
2k 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 ...
0 votes
2 answers
1k 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 ...
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 ...
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 ...
  • 11
1 vote
0 answers
409 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" ...
  • 26
1 vote
1 answer
218 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 ...
1 vote
1 answer
51 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....
1 vote
2 answers
460 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("...
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
0 votes
1 answer
276 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 ...
0 votes
1 answer
1k 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()...
1 vote
1 answer
115 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></...
  • 75
0 votes
1 answer
97 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=\"...
1 vote
0 answers
117 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 ...
0 votes
2 answers
1k 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 ...
2 votes
1 answer
37 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
1 answer
505 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 ...
0 votes
1 answer
69 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 ...
1 vote
0 answers
312 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, ...
0 votes
1 answer
559 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 ...
1 vote
2 answers
2k 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", ...

1
2 3 4 5
11