method for querying list data

learn more… | top users | synonyms

3
votes
1answer
3k views

SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively

I have seen a lot of examples and questions about this out there but nothing I have found has helped me accomplish this. I need to be able to grab all the names of the documents within a given ...
1
vote
1answer
843 views

How to filter by only pdf files in querypacket?

In a query packet used in SPServices to do searches on Sharepoint 2010 using jquery, I want to filter the results to only .pdf documents. How can I do that? The below shows all types of files... ...
1
vote
2answers
3k 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. Can any one please guide me on this topic> ...
0
votes
2answers
397 views

foreach loop inside caml query

I have a list of Employee class which has empid and empname as property. Now I want to construct a caml query IN clause where list column id in empid. How can I write a foreach loop inside caml ...
1
vote
1answer
835 views

How to get only the first x items starting at position y from a list, using CAML query?

In sharepoint 2010 client object model in javascript, I want to create a caml query, that can download items from a list. I have this part working, but I want to download only x items, not the whole ...
1
vote
1answer
2k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value ...
1
vote
1answer
175 views

extend caml token ?

is there an hook or interface or whatever that could be used for extending token functionality of sharepoint? For example [Me] token is insufficient for me and I would like to for example develop my ...
1
vote
2answers
192 views

CAML Query works in my VS2010U, but not on anybody else's computer

I have a list with records uniquely identified by project numbers. This is column 5 - Col05 in my list. It works fine when I run the code, and I am getting the expected record. I can also read the ...
2
votes
2answers
1k views

Caml query to get the next event from calendar

I'm facing a problem building a caml query for the calendar list. Here is my caml query SPQuery query = new SPQuery(); StringBuilder sb = new StringBuilder(); ...
1
vote
1answer
562 views

Expand recurrence and CalendarDate:Event EndDate not autocalculated for recurring events

I have done the following code to save a recurring entry to Calendar List named Bookings. SPSite site = new SPSite(SPContext.Current.Web.Url); using (SPWeb web = site.OpenWeb()) { ...
1
vote
0answers
113 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 ...
0
votes
1answer
84 views

Problem with multiple text filters

I have a custom list that has a text filter connected to allow the user to filter one of the list columns. I now need to add a second XOR text filter to allow the user to filter on a different column ...
0
votes
1answer
5k views

CAML Query to get Lookup field value

I've written an autohosted-app to show a few data that are in a list. To get the data in the list, I use this piece of code with a CAML Query. using (var clientContext = ...
0
votes
1answer
125 views

How to list all alements by CAML to SPGridView

Is it possible to display the listitems retrieved from a CAML query in a SPGridView? How can I implement it?
0
votes
0answers
146 views

CAML Designer: Could not load file or assembly 'Microsoft.Sharepoint

I am new to sharepoint, and this community. I have a CAML Designer program (http://karinebosch.wordpress.com/2012/05/12/caml-designer/) that I want to use to run queries on my Sharepoint Online lists. ...
1
vote
1answer
235 views

How to create field with formula using CAML XML

Suppose I need a DateTime field that shows the current date + 30 days
2
votes
2answers
1k views

Error in CAML Query with multiple “AND”

When I run the following query I get an error: <Where> <And> <Eq> <FieldRef Name="IssueLOB" LookupId="TRUE" /> <Value ...
0
votes
3answers
316 views

CAML Query: use the value of a property of a lookup

My project consists of two lists: a list of documents. This list has an SPUser field that determines who is responsible for that document. a list of projects. This list has a multiple lookup to the ...
2
votes
1answer
245 views

Can we query and fetch data from LIST between different subsites using CAML Query.?

Have LIST created under one site, can the same LIST be used to fetch data from other site using CAML Query.? eg: Consider a LIST "xxx" created under SitePages/AAA/Lists/ Can i access the LIST "xxx" ...
0
votes
3answers
2k views

Better way to get a SPListItem by Field

I want to get a SPListItem from a SPList where a field match a value. I have to ways to do it, CAML and LINQ. My code is: LINQ ... SPList list = Web.Lists["MyList"]; SPListItem item = (from ...
0
votes
1answer
2k views

Search for specific folder in library with CAML

I'm looking for a way to search for folder which name starts of 'Foo' using caml query in list. How can I narrow results to return only folders?
0
votes
1answer
193 views

CAML : Cannot complete this action

It seems my following query is failing and throwing "Cannot complete this action".However when I test this query in CAML Query builder it's working fine. <Where> <And> ...
1
vote
0answers
214 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 ...
0
votes
3answers
1k views

Is it possible to have CAML Join without Lookup Columns?

I am new to SharePoint. I am developing a web-part in that I am trying to join two list. I have a same web-part in that lists were join using LINQ query. But it takes more time to fetch the data. So ...
0
votes
2answers
2k views

Left Outer Join in SharePoint 2010

I have 2 lists in SharePoint 2010. First List E lists all locations. In the second list H I use first E list as lookup for Location. Every month users inputs information in list H. List E has ...
2
votes
1answer
158 views

CAML Query where X =(A && B && C && D)

CAML makes me sad some days. Can someone point me in the right direction for the syntax in regards to a CAML query that would evaluate where X= A&B&C&D. My nesting is all off i'm assuming. ...
1
vote
1answer
241 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=""> ...
2
votes
1answer
223 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 ...
3
votes
2answers
990 views

Get SPQuery TotalItems from query

I want to get the total number of items that match my Query, BUT also limit the results. So say I have 100 items in the list. 50 of the 100 items in the list match my query. I want to only get 10 ...
1
vote
1answer
591 views

How do I select only top level folders using CrossListQueryCache?

I want to select the list of folders (without subfolders, not recursive) of a Document library using CrossListQueryCache. Everything is working fine except that i am receiving ALL the folders and ...
2
votes
1answer
956 views

Caml Query - skip X first results

Let's assume I have list with 100 items. Is it possible to write CAML query to get 5 items, but skip 10 items from the beggining? Something like LIMIT and OFFSET in SQL?
2
votes
1answer
141 views

Help Return Lists With With No List Items

This is my first time posting and I'm looking for some help, so hopefully someone has an answer. I used the search, but didn't find anything. I created a custom list definition, and content type ...
2
votes
1answer
1k views

Search document from document library usin CAML query

I have document library which have folder and sub folder. the folder and sub folder level is more than 5. like as follow : Document Library |-> Folder-1 | -> Folder-1-1 | ...
0
votes
2answers
178 views

CAML Query Issue A or B and C

I'm trying to write a CAML query with the following parameters and I'm not having much luck. It should be simple enough but I can't figure it out. WHERE (X) EQUALS (A or B) And C I'm hoping someone ...
3
votes
1answer
6k views

How to retrieve items from document libraries using client context without performance lag

I need to retrieve items/list items from SharePoint 2010 document library and display it in a list ListView using C#. I have used following CAML query to retrieve list items and its properties. ...
1
vote
1answer
226 views

CAML Query results every time 0 items

I try to filter items in the list by using caml. The List contains elements that matches the Filter. The code: enter code here SPQuery qry = new SPQuery(); qry.Query = @" ...
0
votes
3answers
2k views

how to check CamlQuery results

.I am running below query against a sharepoint list. How to check the results of below Camlquery? cPop is set with value 'AboutUs'. Result is always zero records although list has valid matching ...
6
votes
5answers
1k views

When I execute a CAML query, how do I know what ListItem details I can include?

I was querying a SharePoint library, trying to retrieve some file attributes. Apparently some things like FileType and Date are not supported, even though those fields are listed as a built in field. ...
0
votes
2answers
639 views

CSOM list query with JOIN, return tree structure

I have two lists, Parent and Child. The Child list has a lookup field called "Parent", which "looks into" the Parent list, using ID column. Using CSOM I'm joining the lists with this query ...
0
votes
2answers
366 views

caml-query Sharepoint[2010]: CAML select several records, same ID

I have a list where IDs are not unique. How can I make a CAML Query for this list so I can get all values for a particular ID This is my list: ID Customer LOB PeriodOne PeriodTwo ...
1
vote
2answers
641 views

SPQuery always returns values

I am trying to check a list for related values but for some reason every item in the list is returned each time. I have seen this issue before and for me its always meant a bad CAML string but I have ...
4
votes
2answers
2k views

CAML Query for items with a text value containing square brackets

I'm attempting to query for list items using a value stored in a plain text multi-line of text field in a SharePoint 2007 custom list. My column is named FilePath and contains a value like: ...
3
votes
1answer
876 views

CAML Query OrderBy ignoring non set values

I'm currently writing some CAML Query for a QueryOverride in one of my Content Query Web Parts as I'm in need of multiple "Sort by" fields. My issue is that one of the additional fields that I need ...
2
votes
1answer
696 views

CAML query speeds

So I have a list of about 75,000 items. I want to know if I perform a CAML Query that returns a couple of hundred items, is that going to be slow? (slow = 10+ secs, med = 5-9 secs, fast 0-4 secs) ...
1
vote
2answers
1k views

CrossListQueryInfo\SPSiteDataQuery how to skip items with specific WebId?

Customer wants to see 10 news items from all webs on front page. Also customer wants to specify some news that we should skip. I am trying to do next thing: var id =1; <Neq><FieldRef ...
3
votes
4answers
5k views

Not IN CAML Query

I have two Lists in SharePoint 2007 Clients Actions Actions list has a Lookup column called Client which takes its values from Clients List. I want to display all those clients which are NOT ...
1
vote
0answers
162 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
3answers
3k views

how to query multiple lists using CAML

I have requestID, date column in 4 different lists. I want to build a webpart which shows user requests of different types therefore i need to query multiple lists with column requestID and date. How ...
0
votes
2answers
361 views

How to skip few list items using SharePoint CAML?

I want to skip sharepoint items where 'location' field equals 'USA' and 'Id' equals 3 How can i do this with sharepoint CAML query? I need something like NOT for this AND: <And> ...
0
votes
1answer
1k views

How to check DateTime condition in CAML Query?

I want to fetch the records from List which are created in Last 5 minutes. I have written following code, but its not working. giving me error. <Geq><FieldRef Name='CreatedDate' /> ...