method for querying list data

learn more… | top users | synonyms

2
votes
4answers
2k views

CAML query to find a value that does not begin with

I want to build a CAML query to search for all title fields that do NOT begin with a certain value: something like this: Where Title NOT BeginsWith 'myvalue'. How can i do that in my CAML query?
2
votes
2answers
3k views

What does the GetListItems query option IncludeMandatoryColumns do?

I found myself working with the Lists.GetListItems method fairly often. Unfortunately, I have never understood what the IncludeMandatoryColumns query option actually does. The documentation seems to ...
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 + ...
2
votes
3answers
2k views

Problem using viewFields to return more fields

Do I have to put a prefix of ows before retrieving fields? because I am trying to obtain additional fields and not being able to? soapEnv += "<listName>My SP List</listName>"; ...
2
votes
2answers
433 views

DefaultValue for CAML Variables

I have a question sort of related to this post. The default value of the CAML variable UserID is the CurrentUserName. Can that be set to different properties or is that fixed? For example, could ...
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 ...
0
votes
1answer
487 views

PreSaveAction and CAMLQuery

I'm cross posting this from Stump the Panel for some more visibility from a wider developer base. I'm trying to create a script I'll eventually adapt into a PreSaveAction, but I'm running into a ...
1
vote
1answer
599 views

Does an indexed column need crawling?

I am new to SharePoint and was struggling to get this particular information. Please could anyone explain: Will configuring the shared service provider to crawl the content make CAML queries faster? ...
1
vote
1answer
1k views

How to get checked out SPListItem for current user by file name using CAML query?

I use SharePoint 2010 RTM and now I'm trying to get SPListItem, which was checked out by current user, using code like this: query.Query = "<OrderBy>" + ...
1
vote
2answers
2k views

Caml Query for Order By List for web service call not ordering

I'm calling web service List.asmx using Jquery and getting results using this but its not ordering by DisplayOrder. This is the caml query. <soapenv:Envelope ...
2
votes
2answers
1k views

How do I test if I will be able to execute a query (does the site exist)

When I run a (CAML based query) executeQuery against Sharepoint, sometimes the site does not exist (it is created by a workflow process which may not have run). When this happens, I get a ...
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: ...
1
vote
1answer
672 views

Can I get the list of files for two or more directories?

My current query is below and works adequately enough. The sharepoint developer is creating a workflow that will look at files in the "Documents" folder, and if it certain flags are set, the ...
5
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. ...
3
votes
6answers
5k 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
1answer
588 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 ...
6
votes
1answer
4k 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 ...
0
votes
1answer
747 views

CAML >> Keep getting “one or more fields are not installed properly”

when I debug i can see URL is valid (like below). Shared Documents is tie a to custom content type. string fileURL = "Shared Documents/Marketing Folder/Sales_Report.txt"; oQuery.Query = ...
4
votes
1answer
4k 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 ...
0
votes
1answer
240 views

CAML > get item by it's URL

Should this CAML be working. (I tried it with u2u and it does not display the URL column.) I get this error. {System.ApplicationException} = {"One or more field types are not installed properly. Go to ...
2
votes
3answers
1k views

CAML Query Maximum Size

I am running a sharepoint caml query where I want to check that a field on an item is equal to one of many values. I do this dynamically and may wish to check against many hundreds of values. I found ...
0
votes
1answer
318 views

caml query help

I'm building a webpart that queries an sp list. my list contains two fields (title, tip). title = is a single text line and tip = a yes/no check box currently in my code, i am calling all items in ...
1
vote
1answer
464 views

CAML Query get elements with most recent created date

I'm trying to get the elements with the most new created date using CAML query in sharepoint 2007. I can do it using: "<OrderBy><FieldRef Name='Created' Ascending='False' ...
0
votes
3answers
9k views

CAML, get all list items where text field contains a value?

I would like to use CAML to write an efficient query to get all items in a list where a text field contains a value... for example: **ID Name** 123 234 ...
2
votes
1answer
3k views

ClientContext + camlQuery.ViewXml

I use SP Client and want to return ListItemCollection which will be filled with items from specific view which I choose. I get ViewQuery string by sending view index in viewcollection. Problem is in ...
0
votes
1answer
718 views

Sharepoint 2010 ALERT settings - customize possible set of lists

I want to customize possible set of lists on which user can set "alerts ON". Customizing just ribbon button ("Alert me") for not showing on specific list isn't enough because - on some list on which ...
1
vote
1answer
479 views

CAML or C#: Change the URL of “Edit Item” of Custom List item

How can I change the target URL of "Edit Item" option of a custom list in CAML or .net?
2
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 ...
1
vote
2answers
665 views

CAML Returning Tomorrow's Value when filtering Today

I have the following CAML query for SP2003 SPQuery qry = new SPQuery(); qry.ExpandRecurrence = true; qry.CalendarDate = DateTime.Now.Date; qry.Query = ...
0
votes
1answer
894 views

How do I determine the CAML equivalent for a SQL query?

I want to write an equivalent CAML query for the given SQL Query below: select top 10 * from TestTable where ItemID in ( select top 10 ItemID from TestTable order by Views desc) order by UserName ...
0
votes
1answer
165 views

CAML to search column name

I'm looking to search within each list for a column. The problem is that this column is referred to differently in CAML. Look at this for a detailed explanation: ...
2
votes
1answer
912 views

How can I use managed metadata field in the where clause of CAML?

How can I use managed metadata field in the where clause of CAML?
3
votes
2answers
791 views

CAML OrderBy and managed metadata

I have something like this: SPQuery query = new SPQuery(); query.Query = "<OrderBy><FieldRef name=\"MyTerm\" /></OrderBy>"; myList.GetItems(query); I can sort on normal fields, ...
0
votes
4answers
6k views

How can I Create a join between two sharepoint custom list using CAML Query?

Will you please provide me help to create a join between two SharePoint lists using CAML Queries. I am using SharePoint 2010 Development Platform. Thanks in advanced.
0
votes
1answer
99 views

Retrieving lists from sharepoint site

I am trying to retrieve lists from a sharepoint site. I know how to do it using web services. However, the requirement is that I need to use Xelement GetList and the output should have PropertiesXML ...
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)?
2
votes
1answer
924 views

Nested CAML Querie results in exception “ Some part of your SQL statement is nested too deeply. Rewrite the query or break it up into smaller queries”

All, I am trying to mimic SQL"IN" operation using CAML. Lets take a scenario where we need fetch all the ListItems with ID within a list of IDs. The target list is realy large ( 50k records) ...
0
votes
2answers
602 views

CAML statement for “top x rows” out there?

Let's say I'm querying a big list but only need a subset of the rows for demo purposes. What's the easiest way to say "Top 100 Rows" or similar in CAML? Can't seem to find a statement out there. ...
0
votes
1answer
1k views

Why is this custom view with multiple GroupBys and one OrderBy not working?

First Group By is not working (however the second file subcategory Group By works) The OrderBy is not working Show all items without folder is not working Any ideas?? private static void ...
5
votes
2answers
456 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.
2
votes
2answers
1k views

CAML query get listitems between a specified Row Index Boundary

Is it possible to get listitems between a specified Row Index Boundary from a list using CAML Ex: if there are 10000 records I would like to fetch records between 201 - 250
2
votes
2answers
499 views

Retrieve using CAML the currently published version of a document

I want retrieve the currently published version of a document from a document library using CAML. Can anyone tell me how I can achieve this? I need it to get the currently published version ...
1
vote
1answer
708 views

Using SPMetal to read data from sharepoint 2010

I've just started to look at using spmetal with SP 2010 to read data from document libraries: http://msdn.microsoft.com/en-us/library/ee538255.aspx I'm curious as to how I can ensure that I only ...
2
votes
2answers
3k views

Content query web part filtering on multiple content types

Is it possible to use the Content Query web part to filter on multiple specific content types that do not have a parent/child relationship? I have a requirement to show Events (from a calendar) and ...
1
vote
1answer
2k views

How to retrieve User Information List data

I would like to filter a list based upon a user group that the user may belong to and a specific value found in the User Information List for that user. I tried doing this with CAML in SharePoint ...
1
vote
2answers
904 views

Hard code group name into CAML query

I am trying to hard code a user group into a CAML query's where clause. The reason is so that I can apply additional criteria when the user is in one group, and something else if they are in another ...
1
vote
1answer
1k views

Sharepoint 2010: Full text plus faceted search over an External Content List using Search Services (or possibly FAST)

I have an External List over a products table in our database. I want to be able to build a search form over it via a full text search; in addition to being able to filter down on properties on my ...
1
vote
2answers
723 views

How to update a list item from web service using a where clause?

I have a scenario where I need to update a list item, but I don't know the internal ID of the list item - hence the following won't work for me: batchElement.InnerXml = "<Method ID='1' ...
0
votes
1answer
797 views

How come GetListItems filtering on a field's equality to a value fetches this field's value as undefined/null

I think I found a bug. Please share if you know more about it. I use GetListItems operation to fetch items to display on an ajaxified form. Just an hour ago everything was fine, but now when I query ...
0
votes
1answer
683 views

Is SharePoint's ListViewXML syntax based on a standard?

Recently I had to change a ListView webpart and noticed the syntax that renders the HTML is not XSLT. Is this syntax documented somewhere? Example, <IfEqual> <Expr1> ...