Questions tagged [caml-query]
An XML-based language that is used to build and customize Web sites based on SharePoint Team Services from Microsoft.
954
questions
0
votes
1
answer
15
views
CAML Query to get items under folder\s ordered Ascending
I am trying to retrieve all the documents within a specified folder (including subfolders) and order them Ascending. I am getting all the documents but they are not ordered.
This is what I have so far:...
0
votes
0
answers
44
views
CamlQuery Recursive Search Under Specific Parent Folder
I am trying to recursively search all folders and files under a specified folder for given text. For example sake, lets say my file directory is as follows-
/sites/UsersTeam/Shared Documents/Folder A/...
0
votes
1
answer
70
views
SharePoint 2019 Optimize CAML Query performance for large lists and large number of users to query list
Problem:
I have a production SharePoint farm that contains 10 web front ends with dedicated redundant distributed cache servers and BLOB cache configured, recently I developed an ASCX control to ...
0
votes
1
answer
44
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
277
views
Filtering List Rows into "Highlighted Content" on Home Page using CAML or KQL
Edit: After more reading I think my first question becomes "Can you display a filtered list in Highlighted Content? If yes, can you use CAML or KQL to define the list(s) to filter and the filter ...
0
votes
1
answer
159
views
CAML Sharepoint list to return email of Person Field
Goal: I have a Person column on a SharePoint list called Manager and I'd like to return the Manager Email for each list item as well as the value of a managed metadata field. I'm using the PnP JS ...
0
votes
0
answers
21
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
707
views
Get all Files and Folders and subfolders from a Root Site in a tree view with C# in a PNP Core Framework
I'm currently using PNP Core Framework with a "normal" console application.
I want to get all Files and Folders from a specific Document Library. How can I do this in a simple way? I tried ...
0
votes
2
answers
247
views
How to build a CAML query from a string of data in JavaScript?
I have a string 'listOfUsers' which is in the format user1;user2;user3;user4;user5;user6;
This string could have any number of users.
I would like to build a CAML query which will find all those users....
0
votes
1
answer
266
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
0
answers
59
views
The attempted operation is prohibited because it exceeds the list view threshold
I want to query a list using a where clause like this:
<View Scope='RecursiveAll'>
<ViewFields>
<FieldRef Name='Title'/>
<FieldRef Name='Subcontractor'/>
<...
0
votes
0
answers
32
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
17
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
62
views
Get Items from list without id field query in Batch
I have a SPO list with 30000 list items. I need to query the items in the list based on some of the single line of text type fields. Below is the code to do that
public List<Microsoft.SharePoint....
0
votes
1
answer
26
views
CSOM search fails on Integer fields
I have a very simple query:
var where = "<Where>";
var decoded = decodeURIComponent(searchKey);
where += "<Contains><FieldRef Name='Nr' /><Value Type='Integer'>&...
0
votes
1
answer
43
views
caml query to get events that occur next day
I am creating a timer job for SharePoint 2016 on premise calendar event task. The function is to send reminder email to event attendees 1 day prior to event occurrence. I am creating a timer job to ...
0
votes
1
answer
339
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
82
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
1
answer
70
views
What is the REST URI that does the same as the CAML Query shown here
What is the REST URI that does the same as the CAML Query shown here
This CAML Query (works great):
CamlBuilder().View().RowLimit(5000).Query().Where().TextField('ItemDescription').Contains('laptop')....
1
vote
0
answers
89
views
How to filter CAML Query Results
How can I modify this code so that it displays only the records where the title equals whatever the current title is of the current record I am in? Currently I get all the records from the second ...
0
votes
1
answer
145
views
How to format the output from CAML Query in SP Services
`
`function getFunding(){
` var Funding = [{}];
` var i = 0;
` //Web Service
`$().SPServices ({
` webURL: FundingWebURL,
` operation: 'GetListItems',
` ...
0
votes
1
answer
212
views
Highlighted content web-part should show data based on current logged in user's location
I want a webpart that shows Events/Holidays based on the current user's location.
I'm using the Highlighted Content web part. I've filtered only on ContentType:Events and scope is on whole site.
How ...
0
votes
1
answer
932
views
How to exceed the Sharepoint 5000 threshold in Rest-API Python
I can't use Office365-REST-Python-Client to retrieve Sharepoint files because it's only works on Windows not on Linux - Docker (it throws error:
File "/usr/local/lib/python3.8/site-packages/...
0
votes
1
answer
787
views
RenderListDataAsStream Rest API not returning Field in ViewFields
RenderListDataAsStream is not returning some fields specified in ViewFields.
I need to retrieve ServerRedirectedEmbedUrl but doesn't return anything.
If I run the following CAML Query specifying the ...
0
votes
1
answer
72
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&...
0
votes
1
answer
250
views
Caml Query - Unable to get data by date range
I have a list "List-A" which have an item with following details:
StartDate: 2021-08-31T22:00:00Z [In list view- 09/1/2021, type- DateOnly]
EndDate: 2021-09-29T22:00:00Z [In list view- 09/...
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
1
answer
65
views
Retrieve Lookup metadata using Caml Query?
This "Initiator" is a person or Group column in SharePoint online. I need all metadata(email, key) of this column.
1
vote
1
answer
2k
views
RowLimit not working in PowerShell Get-PnPListitem
I am trying to get few items from SharePoint list so I am using RowLimit in a query, but it doesn't seem to work.
$query = "<View><Query>
<Where><Eq> <FieldRef Name='...
0
votes
0
answers
154
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....
0
votes
2
answers
62
views
Unable to Access multidimensional array elements of SharePoint CAML query
The following code outputs a comma separated array for the var cats. The array has six items as the list "banner" has two columns and three rows of items. I can access the array items in the ...
1
vote
1
answer
364
views
CAML - List Item Pagination in SharePoint 2016
I've got a .NET application that needs to retrieve items from a list and return them, I'm looking for a way to paginate the results in case the number of items gets too large.
I've checked out ...
1
vote
1
answer
276
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'>&...
1
vote
1
answer
1k
views
403 when making axios POST request
I have a feature that loads a map onto a page, and 5% of the time I'm hit with a 403 error and the map data doesn't load properly. I've had a very difficult time with triggering the error, but I was ...
0
votes
1
answer
685
views
SharePoint search query: display people from a specific AD group
I want to display all members / users who are in the Active Directory group "Marketing".
What do I have to add / change to the following query so that I don't see all users, but only those ...
0
votes
2
answers
209
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><...
2
votes
1
answer
355
views
SharePoint 2013 Caml Query on GUID using CSOM returns empty
I'm trying to find a file in a folder by GUID. There is a reason behind it, because I get GUID in document set history and I cannot rely on a file name.
I'm stuck trying all the possible combinations ...
1
vote
1
answer
74
views
How can I join data from two custom lists in SharePoint add-ins?
I want join 2 custom lists in add-ins:
Data of Lists: QuanLyMembers.PhongBanId is ID value of QuanLyPhongBan
QuanLyPhongBan list:
QuanLyMembers list:
This is my code:
function getListMem() {
//...
0
votes
1
answer
998
views
How to download all of the files under a specific folder using CSOM from SharePoint Online?
I have a folder structure similar to this on our SharePoint Online site:
Documents/
Drawings/
For Review/
Released/
Archived/
Documentation/
For Review/
...
0
votes
1
answer
208
views
Caml Query | How to copy today's list items from one SharePoint online list to another in batches?
I am trying to write a Caml Query to get only today's list items and then later copy it into the new list.
I am using the batch method to copy data from source list to destination.
source list gets ...
0
votes
2
answers
181
views
Format size different on some Multiline text when I print to PDF
I created my own custom print page (HTML) from a SharePoint List. The only issue is, some of the multi-line text is showing up in different font-sizes when printing to PDF or Print Preview in IE or ...
0
votes
1
answer
304
views
For loop Caml Query | How to use Caml Query for loop to increment the date range by month and also year once the loop reaches January?
I am using Powershell scripting to get data from a sharepoint list which exceeds the threshold of 5000 items.
I want to create a for loop which increments by month and year.
The Code in the for loop ...
1
vote
1
answer
423
views
Powershell Script Sharepoint Online | how to change a value in a list item (column)?
I have a list with a list item/column 'Category'. Let's say Category has values 'A','B', and 'C'.
I want to find all the values which are 'A' and replace it with 'B'.
How should I do it?
I tried the ...
0
votes
1
answer
25
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
3
answers
640
views
Add multiple Fields For the CamlQuery in Sharepoint Hosted App
I am trying to filter two fields or more that is clean of null values.
It works for the first field but it is not working for the second field:
<View><Query><Where><IsNotNull>&...
0
votes
1
answer
50
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
325
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 ...
1
vote
1
answer
105
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>&...
0
votes
1
answer
2k
views
Highlighted Content CAML Query help
I am having problems with a Highlighted Content WebPart in SharePoint Online where I am using a custom CAML query to filter content from a Page Library on another site collection.
Senario:
I have ...