A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
1
vote
3answers
640 views

CAML Query based on Created and Modified columns in SharePoint List

I want to get all the items that are created or modified from the last 4 hours from a SharePoint Online list using CSOM. I am using the below CAML query but i am not getting the items DateTime ...
0
votes
1answer
888 views

Fetch MULTIPLE “Person or Group” values based on lookup selection

I have a list "List1" having following fields Department : Single line of text HOD : Person or group(Multiple values) There is another list called "List2" with following fields FacultyName : ...
1
vote
1answer
94 views

how to get folders and documents of document library

I have used below code to get files in SharePoint. But using that code I am getting only files not folders. What I need is whole folder and documents in root directory. Please help me. context....
0
votes
1answer
38 views

Get Lists from site within specific date range

I am applying modified date time filter on SPlist. For that I need to iterate list collection and check its date. Is there any query which can be execute the get filtered SPlist collection?
0
votes
2answers
278 views

Downloading data from over 90 SharePoint Team sub-sites

I`m working on a reporting project that mainly uses data sourced from 6 different lists replicated on over 90 SharePoint Online sub-sites handled by a global team in my organization. These sites are ...
0
votes
1answer
50 views

Get sharepoint list name Dynamically

I have some page with multiple views. I want to write a custom filter for default active view. How can I get list or view properties such as (View or list )name using SharePoint CSOM (or other ...
1
vote
1answer
1k views

Fetch “Person or group” field value based on lookup selection

I have a list "List1" having following fields Department : Single line of text HOD : Person or group There is another list called "List2" with following fields FacultyName : Single line of text ...
3
votes
1answer
742 views

CAMl query to get all the listitems whose ID value in between 100 and 110 in SP 2010

I need to get the list items from SP 2010 SPList, having the below criteria: get all the records/listitems whose ID value in between 100 and 110. What should be the CAMl query for matching the ...
1
vote
1answer
87 views

Caml Query - “In” query not working [duplicate]

I have a list with a lookup column in it. (name: colParent) I can query the list with Eq, and get the correct results (2 results returned for 224). <Eq> <FieldRef Name='colParent' ...
1
vote
1answer
816 views

Can I join multiple lists in SharePoint Query with conditions?

I want you guys to clarify to me if SharePoint lists can be handled as Tables in Sql? Am I allowed to use join? and conditions on that query?
1
vote
1answer
65 views

Do WssId:s ever change?

To query for list items based on managed metadata field, first we query the TaxonomyHiddenList to get the WssId for the terms we search for. As the title says, does this WssId ever change or is it ...
1
vote
0answers
61 views

How to Check if a SharePoint Item satisfies a CAML Query condition - Javascript (Rest or CSOM)

For one of my current project I am working on following requirement, Whenever a User Opens any item in SharePoint List on edit form, display form, I want to check if the item being opened satisfies ...
0
votes
1answer
46 views

How to Print SPList in reverse from code behind C#

I'm trying to bind the last items of my list this is my code SPList myList = myWeb.Lists.TryGetList("Calendar List"); SPListItemCollection items = myList.Items; ...
3
votes
2answers
384 views

Query large lists (and specific folders)

I wrote a script in Powershell to reset the role inheritance of multiple files in a Sharepoint document library. Worked fine until I ran across a library with more than 5000 files. Found a solution ...
0
votes
1answer
314 views

CAML QUERY for getting only tasks of current user

I want to show the user only his tasks on specific list, and show him the option to approve and reject from that view. In order to get his tasks I have used the below code: var ...
1
vote
2answers
338 views

CAML query cant read serverrelatedURL with special character

My scenario : I am using a caml query to read all folder and files in a list but i noticed that if i get a folder by serverrelativeURl and the list name is(eg késhév,ie has special character or a ...
0
votes
1answer
26 views

Use results from query SP list as a paremeters to query another lists

I need some advice. Because of asynchronous nature of querying SP lists (I use executeQueryAsync) I have no idea if it is possible to do something like that: I'd like to query first list and get some ...
0
votes
2answers
7k views

Get all items of a Folder and subfolders using csom [duplicate]

My scenario: I need to update 2 columns of items in a certain subfolder.But here the subfolder can contain subfolder and so on which i need to update too.I am using csom to try to accomplish that.I ...
1
vote
2answers
518 views

Filter and Sort the List with Caml Query

We are required to display the list data based on below 3 conditions for the based on 3 columns (Customer Category, Test Type ,Exercise Result) and sort with column (stage Plan) . 1. Customer ...
1
vote
2answers
285 views

CAML Query for sorting Multiple fields not working

I had written the below line to sort multiple fields using CAML query, But it's not working. Can any one help what's the issue. camlQuery.set_viewXml("<View><Query><Where><Eq>&...
4
votes
1answer
2k views

How to Group by the Column using CAML Query

My requirement is to get the unique values from the column "Month" I am using the below code to group the column "Month" , But I don't find any luck .Can any one tell me what's wrong in my below code ...
0
votes
0answers
238 views

CAML Query on value ending with space

I have the following CAML query: <Where><Eq><FieldRef Name="Title" /><Value Type="Text">TestDocument </Value></Eq></Where> I have an item in the list with ...
0
votes
0answers
271 views

List Name is Undefined using clientContext.get_web().get_lists().getByTitle('Tabletop Sessions');

I have used below code to get all the items of the list .But I am getting error as "List Name is Undefined with below code". But When I use rest _api/web/lists/GetByTitle('Tabletop Sessions')/items ...
0
votes
2answers
317 views

Caml query to track existing events in calendar based on date

I am developing an application using SPServices I want to track the existing events in a calendar based on posted start date and end date. my query: CAMLQuery: "<Query><Where><And>...
1
vote
2answers
322 views

How to insert CAML query into SharePoint site?

I am trying to insert some CAML into my site and I am not sure how to do so. I have been looking around at the available Web Parts (and other areas) to allow me to add a CAML query to my site, but I ...
0
votes
1answer
106 views

Get all list with same name in all sub site using SP query

I want to know how to get the lists from all SubSites with the same name using SP query. Thanks in advance.
0
votes
1answer
683 views

C# - How to retrieve lists by their description?

How does one retrieve specific lists based on a "WHERE" query on the list's description? Basically, I've used the description as my query since there are too many default lists in SharePoint site. I ...
0
votes
1answer
360 views

Multiple condition filterfor a list view/CAML query

I'm trying to do a complex filter in a list view. I'm used to boolean searches and using parenthesis to make sure that the AND/OR are executed in the correct order. But I can't figure out how to enter ...
0
votes
1answer
219 views

MultiLookup column and CAML query

How to create CAML query to find items which have all specified lookup values? The query below returns items which have item1 or item2, or (item1 and item2). But I would like to return only items ...
1
vote
1answer
348 views

Filter or CAML query - which is most effective

When using the REST API which approach is the most effective to retrieve items from a list? Is it the filter method or the CAML query? Both works prefectly fine, but I would suspect the query method ...
1
vote
1answer
275 views

Set Scope to recursive on list view

I'm trying to view only items without folders, here is my code to create listview Items = function () { return { "Title": "Items", "DefaultView": "false", "Hidden": "false"...
1
vote
1answer
676 views

CAML - Get Items Under ALL existing Folders

I have about 10 Document folders in my list 'ZooLibrary' and I would like Query to display all the PowerPoint files title from the folders in the list, sorted by ID. Currently, my View Scope='...
1
vote
1answer
350 views

Caml query for multiple status

I want to create a CAML Query like this (status= waiting for approval && Requestor Manager = UserID)or(status= stage2 && Approver= UserID) Please let me know what i am wrong here &...
1
vote
0answers
39 views

Update SP list with data from external DB

The requirements include quick edit, so BCS and OOTB external list are not an option here. The solution I'm looking for has to make these steps: foreach record in a datatable: if the record exists ...
1
vote
2answers
55 views

Display filtered list by category

The current script creates a table showing all Items from the list. e.g. In my list there is a column named 'Category' with 'Cats' and 'Dogs'. What I want to achieve is to FILTER and ONLY display '...
0
votes
1answer
373 views

SharePoint Query Content Class for Pages?

I am trying to build a query to filter only returning a specific section of new pages using Content Class. I am wondering what is the content class for pages? I know for List Item, I could do {...
1
vote
1answer
766 views

Load and use a specifed List View in JavaScript

I have a list view set up via the webinterface of Sharepoint. Now I want to use this view (the CAML XML) to be loaded into javscript to provide list items for a Content Editor Webpart. The view works ...
0
votes
2answers
494 views

Query list having more than 5K items in it

I need to fetch items from a list which has around 20000 items in it. Using caml query i can only fetch 5000 items. What approach should i follow using a server side code.
1
vote
1answer
406 views

Get count of duplicates column value in sharepoint list

Is there a way to find out the count of duplicates column values in sharepoint list using caml query? if yes how ?
2
votes
3answers
84 views

How can i add CAML query to my page?

Sorry for this basic question.I want to read list items. I will use CAML query . But i dont want to use Visual Studio and C#. Is there any way to do this?
0
votes
1answer
175 views

not able to get CAML query to work as desired

I am trying to get items that have travelDate lesser than 30 days before today. and then orderby traveldate But the below query doesn't seem to work <OrderBy> <FieldRef Name='...
0
votes
1answer
178 views

CamlQuery that traverses multiple folders

I've got a CamlQuery that traverses the /public/ folder and returns all files that match a certain criteria and it works gorgeously. Now I need it to do the same for a separate library but have the ...
0
votes
1answer
311 views

SPServices CAML Query Not Working

I have the following CAML filter: CAMLQuery: "<Query><Where><Contains><FieldRef Name='Title'/><Value Type='Text'>WD</Value></Contains></Where></...
0
votes
1answer
176 views

Caml query in visual studio always returns all items in list. U2U Caml query builder returns correct results

I'm using the following query : camlQuery.set_viewXml = "<View><Query><Where><Eq><FieldRef Name='Employee'/><Value Type='User'>" + currentUser.get_title() +...
0
votes
1answer
656 views

CAML Query with contains not working

I have a Multiple Lookupfield on my List (list of document sets) When I do this query it works and shows me the results on the screenshot: <Query> <Where> <Eq> ...
0
votes
1answer
432 views

How to know what are the FileRef field names when build a CAML query?

I am new to SharePoint and for this project I need to add new filter to the CAML query, but I have no idea what field names are available. Is there anyway I can know what FiledRef name I should use ...
1
vote
1answer
135 views

CAML query range does not bring correct number of results

I have a CAML Query that brings 53 results. When I add the range below I get 13 results instead of 10. <Range> <StartAt>41</StartAt> <Count>10</Count> </Range&...
0
votes
2answers
56 views

Is there something wrong with my caml query for List view?

I want to get all the list items that have status "Waiting Approval" and current user is either Manager1 or Manager2. <Query> <OrderBy> </OrderBy> <Where> ...
0
votes
2answers
641 views

sharepoint CAML query in Ascending order

we have webpart that fetch the data from the sharepoint list camlQuery.set_viewXml("<View></View>); now i am trying to do sort the display by enddate (ascending order) camlQuery....
2
votes
0answers
44 views

Unable to see All columns of list in result which is generated by Caml Query

here I am passing caml query to REST Api to get some result on sharepoint online 2016, the same query works fine on sharepoint 2013. my caml query is as below var viewXml = ""; viewXml = { ...