method for querying list data

learn more… | top users | synonyms

10
votes
4answers
3k views

CAML Now Instead of Today - CAML Bug?

I have a CAML query, in which the <Where> node looks like: <Where> <Leq> <FieldRef Name='PublishedDate'/> <Value Type='DateTime'> <Today/> ...
9
votes
2answers
8k views

Where can i download the U2U CAML query Builder for Sharepoint 2010?

I have try to download form below links. But the site is not opening. http://www.u2u.be/res/Tools/files/CamlBuilderSetupv4.0.0.0.zip . http://www.u2u.be/res/tools/camlquerybuilder.aspx ...
8
votes
3answers
6k views

How to write CAML queries filtering on ModStat (Approved, Rejected) when using Language Packs?

When using content approval the CAML for retrieving (say) just Approved Items is <Query> <Where> <Eq> <FieldRef Name="_ModerationStatus" /> <Value ...
8
votes
4answers
3k views

SharePoint 2010 CAML Query fails when indexed columns used

I have an SPQuery that has been working fine until my list hit 500 items: q.Query = "<Where><Eq><FieldRef Name='DefectID' /><Value Type='Counter'>" + DefectID + ...
7
votes
1answer
1k views

Why is my CAML query working in CAML Builder but not in the application?

I have a CAML query that queries a calendar list and I want it to return all the items in the list with an EventDate of today or later, ordered in ascending order. The CAML query I'm using is this: ...
7
votes
1answer
7k views

CAML query for field of type “Person or Group” which allows multiple selections

Consider a list which has a column of type "Person or Group" (single selection) witch contains a SharePoint group. I want to return all rows for which the group is within a list. I know the IDs of the ...
7
votes
2answers
3k views

Can I order by Content Type in a CAML query?

Is it possible to order by content type in a CAML query? I seem to always get the same result no matter what I do with the Order by. Ordering by ID instead works perfectly. query.Query = @" ...
7
votes
1answer
5k views

CAML query builder that supports inner joins?

I'm Looking for a query builder that can assist me in creating CAML queries that will contain inner joins. Does anything like this exist? Update: To ask my question more clearly, I am looking for a ...
7
votes
2answers
741 views

Can a CAML query find all documents that were ever modified by a specific user?

I'm trying to list all documents that were (ever) modified by a specific user, using a CAML query like this one: var query = new CamlQuery{ ViewXml = "<View Scope='Recursive'>" + ...
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. ...
6
votes
3answers
801 views

sharepoint caml is fast - how?

We all know that Caml is faster than using linq, since linq internally gets translated to caml. But can anyone explain how caml is best to do sharepoint queries or how it is fast or what makes it ...
6
votes
3answers
4k views

Caml to get today's birthdays

I have a list with birthday field (DateTime). How do I write caml query to retrieve only the records where birthday falls on today (i.e. only comparing day and month value of birthday column to ...
6
votes
2answers
8k views

CAML Query with Date Range

I'm writing an SPSiteDataQuery and I am having issues with the Query property. I need to return all results where the Record_x0020_Yr_x0020_End_x0020_Date is between 12/31 of the current year and 90 ...
6
votes
4answers
4k views

Where can I find a list of CAMLvariables and ServerVariables?

Having some trouble finding a list of these variables. Any help would be greatly appreciated. More specifically, when I see this on the page: <ParameterBinding Name="UserID" ...
6
votes
1answer
444 views

How to Combine IN-Opeator with LookupIds in a caml-query?

I want to build a CAML - Query using the IN - Tag. The queried Column is a lookup-field to a Title of another list. When I query using the text-property everything works fine: <Where> ...
6
votes
1answer
2k views

Need help with CAML in CQWP

I tried to implement a CQWP web part that could show me all the checked-out files following this guide: ...
5
votes
5answers
17k views

How to get current user with javascript?

I have a list . I want select items of list with a special quary.(get items that created with current user). Then get count of items. I use this code for get current user : function Initialize() { ...
5
votes
2answers
501 views

Get CAML from LINQ to SharePoint

Is there an equilivant to GetCommand in LINQ to SharePoint? I know about ctx.Log, but I'm looking for something to retrieve the CAML from a LINQ statement without executing it.
5
votes
2answers
930 views

Problem with CAML SPQuery ItemChildCount result

I know that this query works fine SPQuery query = new SPQuery(); query.Query = "<OrderBy><FieldRef Name='ItemChildCount' Ascending='FALSE' /></OrderBy>"; But my ...
5
votes
3answers
334 views

CAML query on external list: access denied by business connectivity services

I am trying to run a CAML query on a BCS list and getting access denied as an error when debugging the code: SPList CMList = web.Lists[Constants.cmlist]; SPQuery query = new SPQuery(); query.Query = ...
4
votes
4answers
8k views

CAML query not working

I have written following CAML query to Retrieve items which are due in 7 days, It doesn't seems to be working, Please let me know what I missed ? string internalEndDate = web.Lists["List ...
4
votes
6answers
6k views

How to query using CAML when a value has < in the value

I'm using SPServices to query a list, using CAML, and the column I'm searching (Title) have values that contains < and >. Is there anyway I can use CAML to find these values? It seems that I'm ...
4
votes
3answers
509 views

Is there a way to get Folder object from ListItem one?

This is my first post, so I'd like to say hello to everyone. I'm trying to get Folder object by its path in SharePoint 2010 client application using Client Side Object Model (.Net 4.0). I need to ...
4
votes
4answers
842 views

CAML query error when creating SPQuery query

I have this CAML query var query = new SPQuery{ Query = string.Format(@"<Where> <Or> <Or> <Or> ...
4
votes
3answers
11k views

How to build a CAML query with where clause

I have this CAML below and i'm tring to do something like this. Where username ='username' and id = 'id' <Query> <Where> <And> <Eq> ...
4
votes
3answers
3k views

How to get last major published version?

I am trying find exact CAML query, or other possible way in code to find out "The last major published version" (not necessarily the latest)?
4
votes
4answers
2k views

Help with CAML query

I have the following query but I am not sure if it does what I really want: <Where> <And> <Contains <FieldRef Name='Phase' /> <Value ...
4
votes
1answer
5k views

CAML query with more than multiple AND/OR generates SPException “One or more field types are not installed properly. Go to the list settings page to delete these fields.”

I need to build a CAML query at runtime based on user input. The CAML query could be as simple as <Where> <Eq> <FieldRef Name="Status" /> <Value ...
4
votes
1answer
1k views

CAML: Filter URL field on description (not on URL)

I have a list with an URL-field. Nothing special, just the OOTB Hyperlink-field. I want to execute a CAML-query that selects items with a certain value in the description part of the URL-field. CAML ...
4
votes
2answers
110 views

Get field values from SiteMapNode when getting Items from PortalSiteMapProvider

I'm trying to query my list using PortalSiteMapProvider. Here is my Code: public List<string> GetChachedItems(string webUrl, SPQuery query) { SiteMapNodeCollection nodeCollection = ...
4
votes
2answers
1k 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: ...
4
votes
1answer
638 views

Problems with customizing Ribbon for webparts with “Summary Toolbar”

I have a problem with customizing Ribbon for webparts with "Summary Toolbar". I add the button through CAML code. (Generated by SPSF, but shouldn't matter) My buttons shows up when viewing the list ...
3
votes
2answers
5k views

GetListItems Lists.asmx and Meta Data Columns

I'm trying to use the GetListItems web service in MOSS 2007 to return all the columns and rows in custom SharePoint list. I don't need to filter any of the data, so I've left the QueryOptions and ...
3
votes
1answer
4k views

CAML and External List - pass parameter to ReadList (finder) method

I have a Finder method defined on an External Content type (created with Visual Studio). Whan That method receives a parameter. So the method is something like ReadList(string partnerName). I have ...
3
votes
2answers
7k views

SPService GetListItems with CAML : can't get example to work

enter code hereI am using an example I found on codeplex of SPServices with CamlQuery to try to get list item values with where clause on the ID. For whatever reason this doesn't seem to work for me; ...
3
votes
4answers
14k views

Get Items Under Folder CAML

I am trying to retrive all items that are under a certin folder, in a document library. this is what i have so far List DocumentsList = clientContext.Web.Lists.GetByTitle(list); CamlQuery camlQuery ...
3
votes
2answers
1k views

CAML: Possible to query non existing field?

I'm using SPSiteDataQuery to fetch list contents from 2 different lists. List A) has the fields CustomField and Title List B) has only Title Is it possible to build a (filter) query with ...
3
votes
2answers
786 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 ...
3
votes
4answers
3k views

Caml query builder Office 365 Sharepoint Online

Does anyone knows where to find a CAML query builder that I can use for Office 365, Sharepoint Online? (if there exists one)
3
votes
1answer
3k views

CAML query recurrent events problem

Here is the code I use: SPQuery query = new SPQuery(); query.ExpandRecurrence = true; query.CalendarDate = new DateTime(2013, 1, 1); query.Query = @" <Where> <DateRangesOverlap> ...
3
votes
1answer
4k views

How do I query a list using CAML and SPQuery?

I have a SPList but I don't need to go through everything in that list. I need to establish a CAML query so I can limit the list items. Then, go thru each item from the query result and do something. ...
3
votes
2answers
428 views

CAML query for sharepoint list not working

I have a CAML query where I am getting records between a date range for a sharepoint 2010 list through an asmx web method call. It looks like this ...
3
votes
1answer
2k views

CAML 'Endswith' equivalent?

I have to pull the data from the custom list by using a CAML query. I would like to use the "Endswith" option in the CAML query however it seems to be unsupported in sharepoint 2007. What would be ...
3
votes
2answers
408 views

Caml query with unicode charachter

the caml query bellow don't return the correct result : <Where><Eq><FieldRef Name='ParentLink' /><Value Type='Text'>ⵜⴰⵎⴰⵡⴰⵙⵜ</Value></Eq> </Where> i ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
3
votes
1answer
773 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 ...
3
votes
4answers
1k views

Best way to get CAML for a custom content type

I am trying to get the CAML for a custom content type that I am creating. What I am really doing is creating the content type in Visual Studio 2010 and then deploying that content type to my sandbox. ...
3
votes
1answer
3k views

CAML Query Lookup/Choice Value Type as Text

So, here is some lines of code that i write to retrieve data from Sharepoint list using CAML query. string qryCaml = string.Format(@"<Where> <And> ...
3
votes
1answer
526 views

CrossListQueryCache().GetSiteData(contextWeb) throws NullReferenceException on second query?

I have an auqward problem that's been nagging me on and off for half a years time. It turns out, when I'm finally taking a real shot at it that my query throws a NullReferenceException the second time ...
3
votes
2answers
5k views

Filtering items in a view using a CAML query

I'm having trouble querying SharePoint in such a way, as to combine a view results with my own CAML query inside a WCF service. It seems GetItems ignores my query, and just returns all the items in ...