Questions tagged [caml-query]

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

187 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
1answer
2k views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
5
votes
4answers
8k views

How to apply CAML query on the Calculated Column of the list?

I have a calculated column that stores the calculated date value. When I apply the CAML query, it does not return any row even if the record exists.
4
votes
0answers
392 views

How to (caml)query a list on metedata in the MetaInfo field

Is it possible to write a CAML-query to filter documents with certain info in the MetaInfo field? The information is only stored as the property in MetaInfo, not in a field of it's own. Context: I ...
3
votes
0answers
183 views

Efficient way to Query Large lists to get little data

I am querying a large list with around 25000 items but the data returned is quite small, like 20 items top. Can you please let me know the best practices to do so, for e.g. orderby Indexed column. I ...
3
votes
0answers
369 views

Is it possible to perform Inner Join with Lookup Multiple Value Field?

I use CAML Query to perform inner join between two lists. It works when the lookup field is single value. However, when this field is multiple value, it always throws error: the value does not fall ...
3
votes
0answers
82 views

<In> overrides everything else in SharePoint CAML query

I'm writing a CAML query for SharePoint. The list contains a term set field. I want to get all list items having specific terms, plus items where no term is set. My query contains this: <Or> ...
3
votes
1answer
711 views

CAML batch query - valid XML?

The standard format of a CAML batch query is as follows: <?xml version="1.0" encoding="UTF-8"?> <ows:Batch OnError="Continue"> <Method ID=""> <SetList>288a3dfc-ec52-45aa-...
2
votes
0answers
23 views

Sharepoint CAML Query does not work in IE when searching by Taxonomy Field

I've the code below: function ReceivePages(FirstFolderProd, FirstFolderWithoutSpaceProd, GetTagFolder){ var restUrl = "https://tenant.sharepoint.com/sites/sites/Negocio/...
2
votes
0answers
64 views

SPQuery.viewFields does not return specified fields

I have a list that contains multiple views. I am filtering the view data on the basis of date range using CAML Query. But I don't want all the fields to be return so I used viewFields property of ...
2
votes
1answer
343 views

Include All day events in CAML query for a date

I'm querying SharePoint for calendar events given a date. This works for events other than all day events. Event dates in SharePoint are stored as UTC except for all day events which are stored as ...
2
votes
0answers
42 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 = { ...
2
votes
0answers
142 views

Does Microsoft Graph support CAML queries for SharePoint Online lists?

Can you query lists in SharePoint Online via Microsoft Graph using CAML queries? Beta/Preview functionality would be ok for me to use. If not: any alternative apporoaches to use similar sophisticated ...
2
votes
0answers
57 views

How to use GroupBy in QueryOverride for Content Query Web Part in SharePoint 2016?

I read a lot of forums, questions and answers and it looks like using GroupBy in QueryOverride is not taking in consideration. Here are the several ways I tried without success. Option 1 <...
2
votes
0answers
27 views

Query list item from top level site

Correction of my previous question:Link I have big list in my sub-site. I want to query a list item from a top level site. I can able to query from a sub-site , but my requirement is users want to ...
2
votes
0answers
774 views

group by and count in caml

I need to create chart using JavaScript from SharePoint 2010 list data .I am stuck to create data structure. Status: Pending Department: XYZ Number-row:10 Please help me to create caml query ...
2
votes
1answer
845 views

Sharepoint CAML IN operator not working with FileDirRef

I want to retrieve a list of file from two folders. When I combine two <Eq><FieldRef Name="FileDirRef" />... with <Or> it works fine. When I want to use the <In> operator it ...
2
votes
1answer
446 views

SharePoint 2013 SOAP Request with GetItems fails with NullReferenceException

I'm pretty lost here. I've inherited legacy code which uses SOAP to fetch SharePoint content. One method posts a SOAP request against SharePoint to get the HasUniqueRoleAssignments property of list ...
2
votes
1answer
491 views

Iterate through subfolder in list via CAML & Powershell

I have a need to remove unique permissions on documents in a list, however, the list is over 5000 items so the following won't work, and its SharePoint Online so I can't change the threshold. $ctx=...
2
votes
0answers
1k views

Camlquery with date comparison

Cannot get this to Work, it returns all rows. Anyone? <Query> <Where> <Geq> <FieldRef Name='Modified'/> <Value Type='DateTime' IncludeTimeValue='TRUE'>...
2
votes
0answers
1k views

Expanding user field for LikedBy in CAML query

I'm retrieving like ratings from a list. That is working. But I want to know if the current user has liked an item. I've added the LikedBy column to my include list. Here is the code that is working: ...
2
votes
4answers
2k views

Sp Services and calendar list

I have a SP Service call which uses GetListItems from a calendar list in SharePoint. I'm using it with the FullCalendar plugin. The events render fine that is not my question, my question is this: Is ...
2
votes
0answers
129 views

How to make CQWP retrieve 4 most recent Items in the whole site collection?

I'm a little stuck with one of m Content Query Web Part: On my homepage, I would like to display the 4 most recent items added to my site collection in a Content Query Web part called "What's new?" ...
2
votes
1answer
789 views

Manage files with no checked in version - CAML query

I am using Office 365. We have a document library containing more than 12000+ documents, with a number of folders and subfolders. I need to find a way to get all document which have no checked in ...
2
votes
0answers
72 views

Is there a setting on SPField that would prevent it from being included in a CAML query?

I'm trying to build a CAML query for a managed metadata column. I'm following the guidelines provided here by Microsoft. Essentially they say to query for the term's Wssid. No problem, I can do ...
2
votes
0answers
461 views

CAML Query on External Content Type not honoring the <In> operator

So I've been testing this out for a day or so. For the life of me I cannot get an external list to listen to honor the <In> operator in CAMLQuery. On any other type of list it seems to work ...
2
votes
2answers
757 views

Multiple CAML query to filter Data list view

My Custom list has four columns(Doc ID, Created by, Assigned To, Assigned date). I want to filter the data in Data list view. In my page, there are 4 text boxes and a Button is there for the user ...
2
votes
1answer
327 views

ContentTypes and Site Columns via Visual Studio / CAML Query Updates broken

I've been using CAML queries to do list updates for quite some time, but recently they've stopped working, and I have no idea why. Even an extremely simple query seems to be failing. For example the ...
2
votes
0answers
63 views

How to avoid loosing complex query in a view?

In a custom list definition bound to a custom content type, I attached the out of the box AssignedTo field. In the schema, I defined a view with this query : <Query> <OrderBy> ...
1
vote
0answers
77 views

Check if Parent Folder contains more than 1 document and then delete particular document CAML Query SharePoint 2013 CSOM

I want to delete document with name 'Test' in CSOM. this document is present in subfolder. whereas code should delete this document only if its parent folder(i.e subfolder) has more than 1 document. I ...
1
vote
0answers
226 views

JSOM: CAML Query List view threshold error for large lists

This is a topic discussed many times before but I have a peculiar case now and need some expert opinion on this.Below is a sample scenario I am trying to test: My List Set up: List has 10k items. ...
1
vote
0answers
19 views

Want Filter fetch data from SharePoint lIst on the below code of autocomplete JS

where DocumentOwner(People Group Type Column) = Me (Current Logged in User) Here i save current logged in user in a variable named as OwnerTitle and RequestStatus(Choice Type Filed) is equals to ...
1
vote
2answers
467 views

CAML Query for retrieving only document library items in only one folder

I'm trying to access the documents in a specific folder in a SharePoint document library. the library has multiple folders but I do know the name of the folder. here is an example of the file tree (I ...
1
vote
1answer
35 views

CAML Query issue - OR and AND

I'm working on an application that uses a CAML query to return certain documents based on a number of search and filter parameters. I need some assistance with a query that uses both AND and OR ...
1
vote
2answers
547 views

How to use CAML query with rest

I am trying to get list data with an id from my SharePoint online through REST. I have my ajax call like below. getFunction:function(id){ return new Promise(function (resolve, reject) { $.ajax({ ...
1
vote
1answer
76 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....
1
vote
0answers
59 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 ...
1
vote
2answers
448 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
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
1answer
376 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 ?
1
vote
1answer
128 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&...
1
vote
0answers
94 views

Caml query on contents of a file

I have a document library which contains metadata and a file (The file is .msg). I was wondering if it is possible to create a Caml-Query to query on the contents of the .msg? (Something as below?) &...
1
vote
0answers
288 views

How to get child WSSID based on parent term ID using CSOM

I have got parent term's WSSID by this method. How do i get its child terms ids like this to build my CAML query for search in a share point list using CSOM private static int GetWssIdByTermId(...
1
vote
0answers
225 views

SharePoint Online - Some fields are not loaded in List Item CSOM

1) I am getting list items from a list by CAML query in ListItemCollection objects of Max 5000 items 2) I am pushing each ListItemCollection into a List of ListItem to enable the capability of ...
1
vote
1answer
434 views

filter list using SPServices

I have a list with the following fields (Title, Area, Zone, Reference, qtt). I created two "select" tags for the area and zone fields. I also created an "input" tag for filter field reference. I am ...
1
vote
0answers
133 views

CrossListQueryCache - get 10 items on indexed column

I have a question, basically I build a query and use the CrossListQueryCache to retrieve all the required items. Now all was good and well but there is a problem: lists are big some of them more than ...
1
vote
0answers
234 views

Join two lists without lookup column using caml query and sharepoint web services

I have 2 lists with the following columns: list1 City ID list2 Customer ID I need to join these two lists on the basis of similar ID, I can't use the lookup column method. How can it be possible?...
1
vote
1answer
617 views

using SSRS to generate a report based on a Calendar in Sharepoint 2013

We use the calendar in SP2013 to collect information when a user is away on holiday and when there will be any visitors. It works fine as a calendar but now struggling to generate a report in SSRS to ...
1
vote
0answers
187 views

How to create a CAML query comparison that works on both numbers and strings?

I am working with a system that makes requests to SharePoint lists that have latitude and longitude columns. One of the most common use cases is requesting list items that fall within a certain ...
1
vote
0answers
281 views

Unable to connect to SharePoint Online with CAML Builder

I have U2UCamlBuilder.exe with this I can connect to local sites and build the queries as per requirement. But I'm unable to connect to the online site, once I have connected I can see only -Lists ...
1
vote
0answers
26 views

Content by Query Webpart returning Results twice

I am instantiation a content by query webpart from code. I am overwriting the CAML Query. As soon as my query contains a managed metadata filter all results are returned twice. My query looks like ...