Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
21 views

Camlquery Datetime strange problem

Sharepoint hosted app where saving and reading data from sharepoint list. Getting time to Datetimepicker and convert it to current timezone: var Time1 = $('#TextBox_Startdate').val(); var ...
0
votes
1answer
27 views

Build caml query in javascript in sharepoint designer

<script type="text/javascript"> $(document).ready(function () { var listName = "Leave Request"; var context = new SP.ClientContext.get_current(); var list = context.get_web()....
0
votes
1answer
47 views

Caml Query weekly and monthly

I want to build a CAML query that show the data on monthly and weekly basis. Please help me to provide the best solutions for the query In SharePoint there is a list created for leave application ...
0
votes
1answer
22 views

Searching through REST API and CAML with Paging

I have requirement to filter two fields with substring but I found out that substring is not working in REST API it have some kind of bug. So below question stackexchange.com suggested to use listdata....
0
votes
2answers
71 views

caml query won't return rows with null value in contains query

I have written a CAML query using <Or> with <Contains>. the query looks similar to below. <Where> <Or> <Or> <Contains><FieldRef Name="Field1" /...
0
votes
1answer
38 views

How To: Filter A Query on All Lists Based on Title Contains

I have queried all of the lists within a subsite but need to filter based on criteria in the title. I then need to display the filtered list contents. Is this possible if the list contents are not ...
0
votes
4answers
50 views

How To: Query & Display items from ALL lists within a subsite

I am looking to query and display items from all of the lists that exist (and will exist in the future) on a specific subsite (SP 2013). Below is what I have so far but it is not producing any alert,...
2
votes
0answers
26 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 ...
0
votes
1answer
41 views

How to change date display

Currently the below code gives me a date display of: 2019-01-31 00:00:00. I would like to see it displayed as: 31 January 2019 instead... <table width="35%" align="left" id="myHTMLTable" border=...
1
vote
2answers
52 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 ...
0
votes
2answers
148 views

How to load all list items using caml query?

I'm using SP 2013. And I have a Wiki Page Library. I try to load all items from this list. I'm using the following code: var context = new ClientContext("SiteUrl"); context.Load(context.Site); ...
0
votes
1answer
59 views

Caml Query problem, cannot complete this action

I am new in sharepoint development, Can anyone please help me find an error in this query? I am using javascript to retrieve records. The where clause is based on status and priority fields. Query ...
0
votes
1answer
42 views

wrong datetime returned in caml query in c#

I have custom list in sharepoint 2016 on-premises. There are several columns in DateTime type. I need to query this list in C#, but when I run my query I get wrong dates - I get always the day before ...
1
vote
1answer
28 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 ...
0
votes
1answer
30 views

CAML Query - Results

I've got a mad issue. I'm doing a caml query on a couple of lists. When I make the query with querying the contenttype I get 2 results. If I remove the contenttype from the query, it returns no ...
0
votes
2answers
66 views

Contains CAML query returns only DISTINCT items

I am trying to write a CAML Query that returns all items from the list where in the "Title" field they contain "No Title". (In order to delete them later). The deletion is done in Csharp. I have ...
0
votes
3answers
67 views

CQWP / CAML - Query returned a greater number of results than the web application's query throttling limit

The Issue I have a CQWP which appears to be configured to run with a CAML query (I'm a complete novice with CAML - I've inherited this set-up). It has been used successfully, until recently, to run ...
0
votes
0answers
21 views

Filter Sharepoint Listitems based on Col1 > Col 2

I need to resolve this problem, kindly can someone help me on this. Resource I have a sharepoint list which contains two date column Duedate and ModifiedDate. This list contains 50K+ items Problem: ...
0
votes
3answers
28 views

When running a CAML-Query without OrderBy: Are IDs always incremental?

I want to bulk load a few items from a list. The Caml is something like this: <View><Query><Where> <Gt><FieldRef Name=\'ID\'/><Value Type=\'Number\'>{id}</...
0
votes
2answers
74 views

CAML Query vs Odata Query string operators

For getting SharePoint list values through rest. I came through two solutions writing CAML Query in the body of AJAX call Odata query selector operators(eq: select,expand) in the url ...
1
vote
2answers
149 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
41 views

Get the list specific rows from sharepoint where value exist

I am working in c# and I have a list of strings which contains the projectid of the SharePoint list List<string> guidlist = new List<string>(); // contains project ids On the basis of ...
0
votes
1answer
67 views

Sort list from camlQuery

I am using SP.CamlQuery.createAllItemsQuery() to grab all items from a custom list in SharePoint, however even though the list itself is sorted in an alphabetical order, when it comes through to a ...
0
votes
0answers
22 views

CAML query inside my List view which contain 19 critiria is not working

I want to create a list view inside sharepoint on-premises team site. the list view need to show items which are under any of the 18 customers + that are not Expired.. so i wrote the following CAML ...
0
votes
1answer
18 views

How to Edit/Add to a CAML query return object?

Team, Is there anyway at all, to add the input parameter "issueItem" into the CAML query result, i.e. tag each row of the result, so that when its passed back I can extract it at the same time as the ...
0
votes
1answer
41 views

Can't return data with CAML Query

i'm new to SharePoint so I might be asking something silly, or maybe doing silly mistakes, but i've looked it up all over and couldn't find a solution. So Basically I want to access a Sharepoint list ...
1
vote
1answer
135 views

How to count SharePoint list elements using CAML Query

I have got CAML Query. How to count how many elements is in the list checked ? Here is javascript code: var siteUrl = '/sites/MCUW-IT/kostka-pilotaze/restauracje-pilotaże/'; var clientContext =...
1
vote
2answers
64 views

How to perform nested CAML operations using promises?

Team, I have 3 lists, (a) Issues (b) Risks (c) Incidents. I want to... 1 - Run a CAML query against (a) Issues list to get all the issues not closed. 2 - then run a loop through the titles, and use ...
0
votes
1answer
40 views

Pass number of site from one list to another: Need assistance

I need to pass from one site to another number of site and shiow this record on the View. If I passing record by ID it's all work great, but when I pass by caml Query nothing happening. I tried many ...
2
votes
2answers
180 views

How to get all the files which is modified or added yesterday from SharePoint document library

I am trying to get all the files which is modified or added yesterday from SharePoint document library using below code. List list = clientContext.Web.Lists.GetByTitle(listName); clientContext.Load(...
0
votes
0answers
20 views

Save Mass Data | Spservices

What is the best way to insert bulk items into a Sharepoint list? Currently to insert several objects into a list I do the following: :: For each object I call the insert function in the Sharepoint ...
0
votes
0answers
18 views

Need help on SPSiteDataQuery

I like to retrieve data from two linked lists. Tried CQWP but the XML was too difficult. The parent list is PIR, the child is SIR. They are linked through the field PIR2SIR (lookup) in the child list. ...
0
votes
1answer
108 views

Value does not fall under expected range - caml query view fields

i am trying to update 2 hyperlink fields (internal names=Hlink1,Hlink2) in powershell,but i am getting "Value does not fall under expected range" error once it hits $Item.SystemUpdate(), but if i ...
0
votes
1answer
108 views

Get files modified or added yesterday from SharePoint document library

I am trying to get all the files which is modified or added yesterday from SharePoint document library using below code. List list = clientContext.Web.Lists.GetByTitle(listName); ...
2
votes
1answer
155 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
1answer
361 views

CAML query compare DateTime in UTC

How do I get files using CAML query from SharePoint Online site filtering them by Modified date in UTC? When documents are created or updated on site's list they get the Modified DateTime set to site'...
1
vote
1answer
39 views

What's wrong with my camlQuery?

Is there something wrong with this query? camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'Eenheid\'/><Value Type=\'Text\'>" + myUnit + "</Value&...
0
votes
1answer
40 views

Unable to get exact result for CAML Query

I am trying to execute below condition in REST , But OData in Rest doesn't support null . I would like to execute below condition in CAML Query and Pass to REST. Tried using CAML Query ,But I am ...
0
votes
1answer
94 views

Unable to Query list's items using Rest API + CAML. Error “One or more field types are not installed properly…”

I want to query my custom list using REST API + CAML. And I have to use POST request to be able to get the managed metadata values (mainly Label), so I tried the below Ajax request: var body = { ...
0
votes
0answers
92 views

Get two items from same list in a single CAML query

We have a list with following fields: FlagField : Yes/No DateField : Date only I need to fetch two items from the list One where FlagField is set to Yes and DateField is latest (Descending order) ...
0
votes
0answers
52 views

CAML Query Type as text, show all items

I have this query camlQuery.ViewXml = "<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>21094460</Value></Eq></Where></...
0
votes
1answer
272 views

Get all metadata fields from a document library in SharePoint Online

I've been struggling with a CAML query that will allow me to retrieve all items from a SharePoint Online document library and getting all the metadata as well. I managed to get some, but not all ...
1
vote
1answer
27 views

Generate different Custom IDs when multiple items are added at same time

I have a list : Issues. I'am generating the IDs based upon the departments. There are 4 departments: FIN, IT, MFG, HR. the ID format is FIN001,FIN002..... IT001,IT002... MFG001,MFG002...and so ...
1
vote
1answer
97 views

How to create caml query with group by taxonomy field?

I have a taxonomy field as department .I need to use group by query in this field.is possible to do it? If yes, suggest some idea to implement it..
0
votes
0answers
93 views

How to apply group by in caml query in taxonomy field?

I have created the SharePoint list and added the 'department' field as taxonomy field type.i need to get the list items by using 'groupby' (group by department) in caml query.any one suggest some ...
0
votes
2answers
288 views

Filter Lookup column based on Current Logged in user

I have a small problem i am facing in CAML queries. Currently i am trying to filter a Lookup column based on Current logged in User in SharePoint Online. Here is my code and i am new to using SP ...
1
vote
3answers
270 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
345 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 : ...
0
votes
0answers
33 views

How can add offset day skipping week end with caml query?

How can I add a number of days to date value but skipping weekends and other holidays coming? Example: (Thursday + 3 => tuesday)
1
vote
1answer
43 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....