method for querying list data

learn more… | top users | synonyms

0
votes
1answer
354 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
504 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
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() { ...
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
264 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
107 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
433 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
477 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
671 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
737 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
156 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
864 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
273 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
362 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
839 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
673 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
363 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 ...
0
votes
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
1answer
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
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 ...
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
205 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
799 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
1answer
502 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 ...
0
votes
2answers
220 views

SharePoint list query efficiency

I'm trying to build a very high performance application on top of SharePoint 2010. One thing I'm having a hard time deciding is if I should make 2 list queries (1 small and 1 large) or if I should ...
1
vote
1answer
406 views

CAML query and jQuery to retrieve last item's fields

I want to get list item fields where its the last item that the same user created. Then I want to populate the newform.aspx with some of these items. I'm mainly stuck with the query and how to write ...
2
votes
4answers
4k views

CAML Query Filtering with OffsetDays

I'd like to set up a CAML query in a Data View Web Part (DVWP) that works like this: If a date is not specified on the Query String, then show me items created in the last 30 days If a date is ...
2
votes
2answers
6k views

Using Date offset in CAML query

In SharePoint 2010, Inned to get items from a list based on a condition. Considering one of the fields to be 'EventDate' of type DateTime, the condition is: (EventDate - 60 Days) <= Today <= ...
0
votes
2answers
2k views

SPQuery for Selecting/Excluding Hidden columns from a SPlist

I am trying to take a DataTable containing ID and other columns which are not hidden. I am doing this for a generic list which contains any number/type of columns. so I don't know the field names ...
1
vote
1answer
427 views

How to check if a record doesn't exist in another list

I have listA and another ListB When i a user views an item in ListB there is a custom button that the user clicks. Now when the user clicks the button i insert some rows into ListA which are: ...
0
votes
0answers
79 views

CAML : How to Join Two List in CAML Query? [duplicate]

Possible Duplicate: How can I Create a join between two sharepoint custom list using CAML Query? I have been asked this question in interviews a lot and I am still trying to figure out what ...
0
votes
1answer
240 views

Display ManagedMeta using xslt

I am showing the results of query against a document library within a dataformwebpart. The managed meta data field is named 'Tags'. The output to the page of this column looks like 3;#test;#2;tos ...
2
votes
1answer
2k views

COM exception while querying document library

I have a need to get collection of SPLitsItem currently viewed to user. My solution is a ribbon button which calls custom application page in LAYOUTS via javascript in custom action. Application page ...
2
votes
1answer
9k views

caml query to get listitem by Name field

I am trying to check if a filename exists in the 'Name' column of Shared Docs Library. I think only CAML could help here. So I made this query "<Where><Eq><FieldRef Name='Name' ...
0
votes
4answers
3k views

Where can I find a good CAML tutorial?

I am just starting to get my feet wet with SP Foundation 2010, and need to customize some web parts. I am looking for some CAML tutorials that go beyond what's on the MSDN site, and also include the ...
0
votes
1answer
2k views

Is it required to specify the value type in a CAML query?

I was wondering if CAML query Value Types are strongly typed or not. It would save me some time if I didn't have to specify "text" or "date" every time I made a query. Here is the code I am using, ...