Questions tagged [caml-query]

An XML-based language that is used to build and customize Web sites based on SharePoint Team Services from Microsoft.

Filter by
Sorted by
Tagged with
0
votes
1answer
10 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
1answer
16 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 ...
0
votes
1answer
16 views

Sharepoint 2013 Set Javascript Caml Query output to variable for use in other functions

I am using Javascript to create a CAML Query to get data from a list in Sharepoint 2013. It works perfectly. Instead of pushing it to HTML, I need to push the output to a variable as a string for use ...
0
votes
0answers
31 views

CSOM get Folders in Root of Document Library in paged response

Apologies for reposting, I believed a question I asked last week was answered but I was incorrect. Trying to quickly learn CSOM and CAML to take over the management of an unmanaged document library. ...
0
votes
2answers
23 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
1answer
12 views

Rest query, get values IN a collection

I would like to get the items whose field A is IN (X,Y,Z...). I've seen ways to do it with ORs (Rest API - $filter multiple values) but is there a simpler way? Something like: /_api/web/lists/...
0
votes
0answers
29 views

Get Author's email from joined list

Working on SharePoint 2016 OnPremise, trying to get the email of the author of an item, joining different lists. As an example let's take the following CSOM CamlQuery: <View> <Joins> ...
1
vote
1answer
11 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 ...
1
vote
1answer
19 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 ...
0
votes
1answer
27 views

Powershell Get List Items DataTable Group by on multiple columns/fields

I am trying to use PowerShell Group-by on the DataTable obtained from the SPListItemCollection. The reason for using the PS Group-By is because the CAML query groupby options do not return the ...
0
votes
1answer
18 views

CAML Query with multiple properties

I want to use CAML query to delete elements from a SharePoint list. Right now it deletes element if they have a specific text in their title: camlQuery.set_viewXml('<View><Query><...
0
votes
1answer
22 views

Query to filter RelatedItemID column using CAML

I have to filter RelatedItemID column from workflow task list using CAML query to get only those records that match the MAIN itemID from its corresponding main list. How do I achieve this? I tried the ...
0
votes
0answers
13 views

SharePoint 2016: Find all values of a site column across all sites in CSOM

I am trying to create a list of all the values that are being used for the site column "Classification" across all sites of a site collection. The idea is to build a dictionary to add to the term ...
0
votes
1answer
38 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()...
0
votes
0answers
12 views

Change Caml Query View/Filter using javascript button without reloading page

I have a script to pull a custom list using caml query, push it to html and format it with css to appear as a blog preview on our sharepoint homepage. When adding items to the list, users have the ...
2
votes
1answer
29 views

Is there a way to get the json content of files fetched through a CAML query?

const query = `<Where> <Eq><FieldRef Name="File_x0020_Type"/> <Value Type="Text">json</Value> </Eq> </Where>`; const xml = '<View ...
0
votes
1answer
172 views

Retrieve data from SharePoint list via PnP JS and CAML Query

I wanted to display all files which have the property" Job" = "Job1" how to retrieve list view items using PnP JS and CAML Query here is the CAML Query ? <ViewFields> <FieldRef Name='...
0
votes
1answer
29 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
1answer
81 views

Getting ID for a list item with JS

I am trying to set up a simple subscription tool where users can subscribe to or unsubscribe from various distribution list. The idea is that you select a user through a people picker ('subuser'), ...
1
vote
0answers
23 views

CAML query for child properties

I have a CSOM query like this one: _context.Load(currentItems, lis => lis.Include( i => i.RoleAssignments.Include( ra => ra.RoleDefinitionBindings, ...
2
votes
1answer
32 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='...
1
vote
0answers
17 views

On publishing sites, how does the user's preferred Display Languages preference affect page contents and CAML query results?

On an on-premise SharePoint 2016 farm with Language pack deployed, we see that users with different preferred Display Language (in their profile) get different results of CAML queries, different web ...
0
votes
1answer
24 views

SharePoint CSOM query against concrete subfolder is not working with RowLimit when thresold is reached [duplicate]

Can you please help with the following question. I have a document library with a lot of documents (>5000) which are organized in subfolders. I have to query all documents in subfolder. I use this ...
0
votes
0answers
113 views

Filtering documents on SharePoint Online Library folder in a different site

I have a mammoth document library with folders on a site. I'm trying to show specific files in these folders so this is how the original Library View displays: I've migrated this over from a ...
1
vote
1answer
17 views

SharePoint 2010 CAML - Casting Date Fields?

So I'm trying to build a CAML Query in SharePoint to query a list where Date is greater than a certain value say 1/1/2016, my CAML looks kinda like this <Where> <Geq> <FieldRef name = '...
0
votes
1answer
96 views

CSOM CAML Query - is there a returned fields limit?

I've just noticed that that there is a difference in result when searching for a list item with CAML Query and getting it by ID. Following piece of code returns item with 100 FieldValues: var item = ...
0
votes
1answer
41 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
1answer
73 views

How to retrieve the SP list items without using CAML Query?

I have a SharePoint list and I need to get all items from that list without using CAML Query in JSOM. How can I do this?
1
vote
1answer
110 views

Error retrieving items from large list, although the CAML query has a row limit

I'm able to use a console application to connect to a SharePoint Online large list (more than 5,000 items) and retrieve the title. However, even though my CAML query has a row limit, I still get an ...
0
votes
1answer
60 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 ...
0
votes
1answer
90 views

CAML Query Help - O365 Sharepoint with Managed Metadata

I'm trying to display only documents from a library named "How to get it done" and I want to show all document types that have the Managed Metadata tag of "HFM". Some of my documents have multiple ...
1
vote
1answer
40 views

Binding certain value from SP List to DropdownList

I am currently trying to grab certain values(choice column) from a SP list into a DropdownList in Visual Studio, for example, currently in the SP List choice column, there're 5 choices altogether but ...
0
votes
3answers
44 views

CAML error when querying SharePoint List for more than one input

I have a CAML query which retrieves data from a SharePoint list. It passes for 1 input, but fails when there are 2 or more. Error: Microsoft.SharePoint.SPException: One or more field types are not ...
0
votes
1answer
18 views

Query Modified Date

I found tons of samples with query for modified. But following keeps giving an exception that the query limit was to large (I gues it is the threshold limit). var query = $@"<View Scope='...
0
votes
1answer
40 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 ...
0
votes
1answer
37 views

Help with using Caml in rest api calls - filtering doesn't work for me

I'm trying to filter a Posts list(Blog) by month and year. I created a calculated column and used the Published Date to extract month and year. But my below code doesn't filter correctly when i use ...
0
votes
1answer
49 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 ...
0
votes
0answers
18 views

Having trouble with SPServices AutoComplete pulling from specific columns

I have 2 issues really. I have set this up successfully for some of my fields on my Nintex form. The autocomplete works perfectly. Issue 1: I attempted to set this up on another field on another ...
0
votes
1answer
106 views

CAML Query “Neq” not working with choice field

I an writing one CALM query as below. But seems like Neq is not working for choice field. I am getting wrong results. Does anyone know the work around. <View><Query><Where> <...
1
vote
2answers
75 views

CAML Query: filter items between dates

How to filter items between two dates with camel query? For example, I want to retrieve items created between 2019-9-1 and 2019-10-5.
0
votes
2answers
41 views

CAML - How to handle filter?

SP 2010. I have a value "East & West" and list name Region. How do I handle special characters? here is the caml that breaks <ViewFields> <FieldRef Name='ActionStatus' /> &...
1
vote
1answer
20 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' />&...
0
votes
1answer
39 views

How to set InfoPath form fields values in task list without using workflow?

I have 5x action items fields on the InfoPath form. This form have more than 500 fields so get touching the boundary limits in terms text box fields datatype. Is there any way that we can set the form'...
0
votes
1answer
29 views

'n' number of CAML queries in a single executeQueryAsync function

How to execute 'n' number of CAML queries to get a different list of objects? We can use multiple clientContext.load() if we have a defined number of queries like clientContext.load(collListItem); ...
0
votes
2answers
343 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
0answers
17 views

Populate Fields when Clicking “Save” on Custom List

I have a SP 2013 Custom List with 2 automatically generated numbers. Currently, they are queried and populated upon selection of input values for the first 2 fields. The form works great for a single ...
1
vote
1answer
62 views

Camel Query OrderBy not working for Decimal Number

I have column name OrderBy of Type Number: I am using below CAML Query: "<View><Query><OrderBy><FieldRef Name='OrderBy' Ascending='TRUE' /> </OrderBy></Query>&...
1
vote
2answers
39 views

Field Value of Loaded List Item is Unexpectedly Returning “NaN”

I'm trying to query the last item in the current list where status = New, so I can auto-populate one of the fields based on the previous item's value. Executing "alert(collListItem);" displays "[...
2
votes
2answers
198 views

CAML Query Last List Item Where Status = New

I have a SharePoint 2013 custom list and a requirement to load the last list item where Status = New. I first tried SPGetLastItemID with a CAML query filter - however, that method only returns items ...
0
votes
1answer
58 views

CSOM, GroupBy, specific ViewFields and system fields

From my SP library, I would need to retrieve a list of meetingID grouped by MeetingID. I tried several attempts with CAML but it didn't work: CamlQuery query = new CamlQuery(); ...

1
2 3 4 5
18