Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [caml-query]

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

4
votes
0answers
388 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
167 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
355 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> ...
2
votes
0answers
18 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
45 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
0answers
39 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
52 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
26 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
740 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
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
0answers
124 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
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
455 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
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
55 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
164 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
0answers
54 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
0answers
38 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
0answers
83 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
111 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 ...
1
vote
0answers
253 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
209 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
0answers
126 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
227 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
0answers
141 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
271 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 ...
1
vote
0answers
925 views

How to pass multi choice(checkbox) values in a caml query to fetch item from sharepoint list in o365

Below is my code: SP.ListItem listItem = null; CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = @"<View><Query><Where><BeginsWith><FieldRef Name=" + field....
1
vote
0answers
108 views

Timeout using SPsite object and U2U Caml query

We have 2 collection. 1 is test and other is production environment. In test collection, I'm writing console application which is using SPSite and SPWeb objects. But it takes nearly 40minutes to get ...
1
vote
0answers
245 views

CAML query results multiple row for people picker field with multiple value in SharePoint webservices

Below is the SharePoint web service I am using to get list items from a SharePoint 2007 calendar list. The calendar list has a people picker field which can have more than one user. Now as I run the ...
1
vote
0answers
109 views

Powershell Query - Columns are missing While selecting Items from List

I am trying to get records from Office 365 SharePoint list using Powershell Script, through "Microsoft.SharePoint.Client.CamlQuery" query. It fetches all the items and the values. However, there are ...
1
vote
0answers
47 views

Why isn't CAML Query Getting Data from a Column?

I have a custom list which I am pulling data from using JavaScript. However for some reason it does not pick up two columns when I call them by their name. I have to use console.log(collListItem....
1
vote
0answers
88 views

CAML, how to get Fields which are having Unique condition

I am trying to get the field info of a list and I need to also know whether the field has Enforce unique values: as true. IEnumerable<List> lists = clientContext.LoadQuery( lists.Include(list =&...
1
vote
0answers
28 views

Why a pair of FieldRef must be specified for a Join?

I'm writing a small js library to abstract away the annoyance and complexity of creating a CAML query. In that regard, can you explain the significance of both FieldRef elements within a Join, when ...
1
vote
0answers
218 views

CAML Query to get only items from SharePoint Library

I have a large document library with folders, I'd like having all the items except the folders. for now, i use this where columns is a list of all internal name from the list CamlQuery q = CamlQuery....
1
vote
0answers
47 views

AllItems customization

I have a custom list definition where I have defined a view with BaseViewID = 1 (AllItems.aspx) <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,...
1
vote
0answers
57 views

Query returns fewer fields depending on credentials

I inherited some code that reads in all the files from a Document Library for processing. The existing production library is a standard library bound to an InfoPath form. A new version of this library ...
1
vote
0answers
1k views

How to filter a list view by SP group membership (CAML, JS, anything)

I have a list. I need to filter the list view in SharePoint to show items: created by someone in current user's group show all to admin group I am using Infopath for the list's form view, and have ...
1
vote
0answers
371 views

CQWP bind sorting with query string

Is there a way to use PageQueryString in CQWP to control the sort order and sort by behavior? I am trying to implement this kind of sortable and filterable table with pagination: Would it be ...
1
vote
0answers
55 views

SP2010 - Visual Web Part - Storing metadata in folders in document libraries

I want to store a number to folders to enforce ordering. I noticed these three pages Get Property Set Property Add Property And I want to know if it's possible to use these to add a number to the ...
1
vote
0answers
160 views

getting top X items in each folder with a CAML Query

i'm trying to do a visual representation of a document library using javascript and webservices. basically i want to present the folders in the library, with a preview of the first few files in each ...
1
vote
0answers
246 views

filtered lookup: query filter

I have a task to make a small helpdesk app :) I have a "SITE 1" where I made a custom list "APPS" with a list of applications and other custom list "MODULES" with a list of application modules from ...
1
vote
0answers
138 views

Sharepoint - caml join with numbers

I have done a join in Caml with my list (example list A) to another list (example list B) One of the fields in list B is a number of 2 decimal places. However, in the view it is displaying lots of ...
1
vote
0answers
123 views

How can i enter User information in the Data element of a list instance

For example... <Rows> <Row> <Field Name="ClassName">Programming 101</Field> <Field Name="Attendee">Domain\User</Field> </Row> </Rows> ...
0
votes
0answers
10 views

CAML and Chart.js not loading initially

Having an issue where some of my CAML data and a Chart based on the CAML data are not showing upon first load of the page. It only loads when I refresh. I'm calling the CAML data via query ID css ...
0
votes
0answers
18 views

Accessing and counting from same list only works once

I've been trying to show a count subtracted from a maximum of 35 for a seating count. I've tried everything I can think of and have come to a dead end for myself. What am I doing wrong in my below ...
0
votes
0answers
13 views

Will a CAML query using Method and Filter against an external list be passed through to the external data source?

I have an external list/content type set up that reads data from a SQL database view. (I only have access to one view, I do not have access to any tables directly.) This database has been around for ...