method for querying list data

learn more… | top users | synonyms

0
votes
1answer
181 views

How authentication is done when using a CAML query for SharePoint List in a console application

I am try to develop a console application in Visual Studio which uses CAML query to get data from SharePoint List. The question is, how does the console application authenticates from the SharePoint ...
6
votes
1answer
482 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> ...
0
votes
1answer
43 views

CAML to get content of referenced list

i got a CAML-Query, which (essentially) pulls the IDs from a lookup field. Then i got another one, which querys the target of the lookup to get the date from that list. So is there a possibility to ...
0
votes
1answer
374 views

How to get week birtdays

I have a list called profile, and this list contains the Birthday field, is a field of type DateTime. I created two fields of type calculated, one gets the day, and the other gets the birthday month ...
0
votes
1answer
70 views

CAML search ignoring diacritics

A rather strange request has appeared from our client, who wants to be able to search a SharePoint 2010 list for items (based on a string column) while ignoring diacritics. A quick example, assuming ...
2
votes
2answers
350 views

CAML Query behaving differently in CAML Builder and Code

Based on feedback from my earlier question, I have constructed a query using the excellent CAML Builder tool: <Where> <Or> <Membership Type='CurrentUserGroups'> <FieldRef ...
10
votes
4answers
4k 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/> ...
0
votes
2answers
6k views

SPListItemCollection Get ItemCount with rowlimit

I am filtering a list in caml SPQuery oQuery = new SPQuery(); oQuery.Query = "<OrderBy><FieldRef Name='FullName' /></OrderBy><Where><Contains><FieldRef ...
2
votes
1answer
258 views

Should we use web service lists.asmx over CAML when working with large lists

There is a list that has around 100k items in a SharePoint Site Collection. This site has been customized to serve certain business requirements through visual webparts. While, regular CRUD ...
1
vote
1answer
528 views

“Not in” membership caml query

In a custom list definition, I'm building a view with this query : <Where> <Or> <Membership Type="CurrentUserGroups"> <FieldRef ...
1
vote
1answer
383 views

Issue while Fetching recurring items from Sharepoint Calendar

I want to fetch all the items on a particular day. Programmatically the entry is added as recurring event, Now i need to fetch all the instances of recurring event, on each day as per the date ...
1
vote
2answers
664 views

Lists.GetListItems Query for items with a specific author

I am trying to query a list in SharePoint 2007 to get the items of the list that were created by a specified user. Here is my CAML: <Query> <Where> <Eq> ...
0
votes
1answer
366 views

Task list field database location changed from 2007 to 2010

What I've witnessed I've just noticed something rather annoying with SharePoint following an upgrade from 2007 to 2010. The task list schema in SharePoint 2007 had the 'Assigned To' field first. ...
1
vote
1answer
513 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()) { ...
0
votes
3answers
2k views

Current User Task using CAML Qurey

Here's my query to get current user task using CAML but it's not working SPUser me = web.CurrentUser; SPList list = web.Lists["Tasks"]; SPQuery qurey = new SPQuery(); qurey.Query = @" ...
1
vote
1answer
101 views

I need help with creating CAML

I have a document library MyLib and i need to find specified file in it . query.Query = @" <Where> <Eq> <FieldRef ...
5
votes
5answers
18k 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() { ...
0
votes
2answers
3k views

Retrieve items from one column in a list using CAML and bind that data to dropdownlist

I want to retrieve a column items from the list. My list contains two columns. I want to retrieve first column items and those items should bind to the drop down list. I am doing this in a web part. I ...
0
votes
2answers
271 views

SQQuery, Dates and Regional Settings

First, some setup: My Site is set to Eastern Time, and the server is located in Eastern Time. I'm trying to run a query against a list using the created date. I have tried using all variations I can ...
0
votes
1answer
108 views

A column is not appearing in GroupBy option when editing view

I have a document library created from a custom content type (which inherits from Document type). The Document Libraries are created via feature activation using CAML in the Elements and a List ...
0
votes
1answer
1k views

SPServices: How would I add Ascending=False to CAML in GetListItems

How would I use SPServices GetListItems and still be able to add Ascending=False to the CAMLViewFields? I haven't used this for long and I am just wondering if this is possible? Thanks as always!
0
votes
1answer
447 views

how to query greatest ID of each value in a Sharepoint list?

I have a list with two columns (ID,Value). I want grouped list with value columns then select greatest Id of it. ID | Value 1 | 101 2 | 305 3 | 102 4 | 101 5 | 305 6 | 101 Result : ID ...
0
votes
1answer
505 views

SQL Not IN equivalent in CAML

I have two list(subject, subjectcategory). subject(ID,Title,CategoryId) subjectcategory(ID,Title) I want to create a CAML query for SharePoint that does something like this SELECT ID, Title ...
1
vote
2answers
688 views

Simple SPQuery throws error

I am trying to pull populate a lookup field using a lookup value without the lookup ID. I am getting the error: "One or more field types are not installed properly. Go to the list settings page to ...
2
votes
1answer
8k views

How to use GroupBy in CAML query

I have simple list, consisting of 2 columns - Date, Order. Now what I want to do, is to GroupBy Date and count orders. So, for example if I have following items Date Order 08/10/2012 5 ...
2
votes
1answer
750 views

Does an OrderBy CAML query return ONLY the most recent items?

var query = new SPQuery { Query = "<OrderBy><FieldRef Name="Created" Ascending="False" /></OrderBy>", RowLimit = 100 }; Does this return the 100 most recently created items? ...
1
vote
2answers
161 views

Dynamically assemble CAML to call related List Items?

I have good methods in place to get my core List of Posts. Let's say I get the 100 most recent Posts. I'd like to get all comments related to those posts. Comments have a field called PostID that ...
2
votes
5answers
915 views

How to get the nth record using CAML from list

How to get the nth record (lets say 133rd) from the 1000 records (or unknown number of records) by using CAML query.
0
votes
1answer
3k views

Get URL of image from Picture Library using CAML

How is it possible to get the URL of an image that is stored in a Picture Library using CAML? Currently, I've made a CAML Query and run it in the U2U CAML Query Builder, and am seeing values like ...
1
vote
1answer
3k views

Adding IsNotNull and ViewFields in CAML Query

Trying to add IsNotNull parameter and ViewFields paramter but throwing an error. Am I inserting incorrectly or missing something to make sure this executes correctly? Seems like View is bring back all ...
1
vote
1answer
276 views

Get all webs with certain property value

If I have a certain number of webs within my site collection, and those web have set some property, eg. web.Properties["foo"] = "bar". I'd like to get list of all the webs which have property foo set ...
2
votes
2answers
378 views

How to Add a ListItem?

I am able to add an item to a list using the CAML below. Now I need to modify it to make sure I can add an attachment as well. What is the syntax to add an attachment? <?xml version="1.0" ...
0
votes
1answer
1k views

How do I use a variable in CAML query to send approriate email

I have created two list. One is "Storage" the other is "Approvers" I am able to retrieve all values in the column 'System' in the "Storage" list by iterating through the column list, like so and ...
0
votes
1answer
94 views

CAML Query assistance

I have a query I created using U2U CAML query. I am able to retrieve all the information within the builder, but when I use in VS I am returning everything seems like. Unless while debugging I am ...
0
votes
3answers
860 views

What is the difference between CamlQuery and SPQuery

Maybe a simple question, when to use CamlQuery and when to use SPQuery ? I think that SPQuery is used inside a WebPart running on the SharePoint server, and that CamlQuery is part of the Client ...
1
vote
2answers
708 views

comparing and modifying items in a list

Ok, so adding to my previous question here - I want to get certain columns from a sharepoint list, then compare values of those columns to items in my own c# list and, if they're different, modify ...
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> ...
1
vote
1answer
379 views

CAML query - examine Contents column used in freetext predicate

In my query I use the freetext predicate: and freetext(Contents, 'my search string') I'm getting some unexpected results from this search, namely the documents contain no relevant content, yet are ...
1
vote
1answer
2k views

CAML query for null lookup field values

I have a problem with filtering list items using CALM I Have this list: Code - Text, Name - Text, Link - Text, Order No - Number, Parent - Lookup to this List. I want to filter all items where Parent ...
0
votes
2answers
2k views

Getting items from rows 4-8 in a Sharepoint list using CAML query?

Here is the code Im using to retrieve the first 4 most upcoming announcements from the OOTB announcements list in sharepoint: How do I modify this to retrieve the next 4 (5,6,7 and 8) most upcoming ...
0
votes
3answers
1k 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
3answers
809 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 ...
2
votes
0answers
56 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> ...
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 ...
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; ...
1
vote
0answers
116 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 ...
0
votes
0answers
209 views

How to create charts with custom filters about sensitive data using JS without using external APIs?

I need to create charts out of business data which comes out of SharePoint lists in SharePoint 2010. The solution needs the ability to easily filter the data by custom queries, just like the SPJS ...
1
vote
1answer
2k views

CAML Query to pull list items only if their approved?

Although the solution seems relatively strightforward it doesnt seem to work. Here is my CAML query to pull all items from a list that have been approved through the OOTB Sharepoint Approval ...
2
votes
2answers
830 views

CAML query to retrieve the second set of three list items from the announcements list?

The CAML query to pull say 3 items based off of the following requirements seems pretty starightforward: Title is not null Expires(Expiry Date) is greater than or equal to Today Order Created in ...
3
votes
2answers
510 views

Using part of date in CAML query

I want to create new view for my list. The list contains a column called Year, which is a number and contains, as name suggests, year. Eg.: 2012 2011 2010 2009 I would like create a view, where I ...