method for querying list data

learn more… | top users | synonyms

2
votes
2answers
641 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
485 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
213 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
387 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 ...
1
vote
3answers
3k 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
5k 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
387 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
224 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
7k 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
2k 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, ...
2
votes
4answers
1k views

where clause is ignored when query list

I have a CAML query which returns lists by a lookup field. here is the query <Query> <Where> <Eq> <FieldRef ...
0
votes
4answers
205 views

Should I learn CAML? [closed]

I've been spending the last few days studying sharepoint and plan to work with it for a long time - but I've only just heard the word CAML mentioned and seen it's querying in action, is it something ...
0
votes
3answers
4k views

SPServices <today /> not returning correct results

This is the chunch of code that I am working with. I am trying to get only the events (normal/all day/recurring) to show, and it is returning all items for the whole week. Any ideas? ...
1
vote
0answers
677 views

Nintex Workflow Query Lookup Filter not working for User field [closed]

So I have a nintex workflow where a username is extracted from an infopath form via Query XML. Confirmed that it comes out into the user variable (of type person or group) in the format DOMAIN\USER ...
8
votes
3answers
5k 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 ...
1
vote
4answers
6k views

get all document from all folder and subfolder from document library sharepoint 2010

I want to retrieve all documents from folder to it's subfolder and so on using client object model.Please help me.
0
votes
1answer
584 views

Caml query returning multiple lists

Trying to load a list from library containing two files. The following code when tested in CamlBuilder it is returning single row according to the filename selected. But in the program it is returning ...
2
votes
3answers
2k views

The <today/> tag not working in my CAML Query?

I am trying to retrieve the 5 most upcoming (with respect to expiry date) announcement list item "Title's".The query partly works but what it fails to do is include and display todays announcements as ...
0
votes
1answer
447 views

Logical AND ,OR CAML Query not working in External List

I am using ClientContext Class and CAML query to retrieve items from External List in sharepoint 2010.I have built the query with Logical AND Condition in CAML Query like this string sDataFilter ...
0
votes
1answer
213 views

Filter list based off a set of IDs

I've written a web part that generates several KPIs based off a list given: - List and column names placed in custom configuration values - Parameters at run time Each KPI is composed from a set of ...
3
votes
1answer
889 views

Content Query webpart- CommonViewFields vs ViewFieldsOverride

I'm reading up on the Content Query web part and based on this page, I can't understand the difference between the CommonViewFields property vs the ViewFieldsOverride property. How are they different? ...
1
vote
2answers
2k views

Using the Now() function in CAML Query?

i am trying to get the 3 most upcoming events from the current date and time (The current data and time refers the time everytime my web part loads. Basically it is not a fixed date and picks up the ...
0
votes
2answers
2k views

Populating a simple custom Event Web part that retrieves information from the OOTB calendar web part

I have a requirement to build a Event web part that shows the 5 most upcoming events and a see all link (that links to the OOTB calendar view). Here is a graphical representation: How exaclty do I ...
1
vote
1answer
4k views

CAML Query to filter a list item based on comparing item[“Title”] to ascx label.text control?

"<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>'Label1.Text'</Value> </Eq></Where>"; I have not run this and checked yet, simply because I ...
0
votes
4answers
10k views

CAML Query to retrieve announcement items in descending order based on ID # - Not Working

spQuery.Query = " <OrderBy> <FieldRef Name='ID' Descending='True'/> </OrderBy> <Where> <Eq> <FieldRef Name='Title' /> <Value ...
0
votes
1answer
614 views

Rendering IMAGES (attached to announcement list) in my custom web part?

Please bear with me as I am brand new to the whole sharepoint world. I want to be able to display images that have been attached to OOTB announcement list in a custom visual web part I am trying to ...
2
votes
1answer
3k 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 ...
0
votes
2answers
907 views

Is <QueryOptions> valid in SP.CamlQuery for meeting work space

I'm trying to query all items in a meeting workspace list. I'm trying a query I think should work, but still only returns items specific to the instanceID. Is there a different flavor for client side ...
0
votes
1answer
2k views

How can I pass a Query String variable into the CAML of a jQuery script?

I'm using Marc's SPServices jQuery library - the SPFilterDropDown script - to filter the items in a Lookup multi-select field on a New Item DVWP. It works fine if I stick some static text in there - ...
0
votes
1answer
289 views

How can I test a CAML query using mocking?

I have a CAML query in a class and I'm using unit test to cover my code with some proper test. For the SharePoint classes and stuff, I use TypeMock to mock the SharePoint objects. I would like to ...
0
votes
2answers
464 views

How to use XmlDefinitionLink & CAML to reuse View definitions in multiple XsltListViewWebPart controls?

This is what I want to achieve (in SharePoint 2010): A custom page containing 2 XsltListViewWebPart Both of them rendering the same list data, but with different XSLT definition for display I ...
0
votes
1answer
597 views

SharePoint Object Model: how to query ONLY last major version of data from Publishing Page?

I came into a situation where I wanted to use SharePoint Object Model SPSiteDataQuery to query data from Publishing Page. However, I dont want the data query based on the permission on current login ...
0
votes
1answer
332 views

CAML strip or remove HTML tags in custom AlertTemplates.xml

is there any way to remove the html tags for text in CAML? I have made a custom alert template when sending e-mails that uses a field that looks like this: <'GetVar Name="DisplayName#{Field}" ...
2
votes
0answers
198 views

How to (caml)query a list on metedata in the MetaInfo field

Is it possible to wite a CAML-query to filter documents with certain info in the MetaInfo field? The information is only stored as property in MetaInfo, not in a field of it's own. Context: I have a ...
0
votes
1answer
196 views

The multi-part identifier “t16.nvarchar1” could not be bound

MOSS2007 with SP3. I have a list with many items. From code I get items using simple criteria. (give me all products that have DeliveryDate between in a specific time interval and the field Customer ...
2
votes
4answers
10k 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 ...
1
vote
0answers
1k views

ProjectedFields working in SPQuery but not in the View

I've three lists: Competitions, Works and WorksVotes, linked to each other through Lookup fields. WorksVotes list has Lookup field to Works list, and Works list has Lookup field to Competitions list. ...
3
votes
4answers
4k 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
2answers
6k views

CAML Query on “Person” field type

I would like to query list and get items that were created by specific user, in my list I have the fild "User" of type Person I tried this but it didn't work: <Where> <Eq> ...
0
votes
1answer
726 views

SPQuery works on ListViewByQuery but not with GetItems

In one of my webparts, I have a ListViewByQuery displaying some elements (or all) of a specified list. The SPQuery is built dynamically depending on the search fields. Here is how I build the ...
5
votes
3answers
3k 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 ...
1
vote
1answer
307 views

SPQuery doesn't return all rows

I don't know why i only get one row as per below: When they are 2 rows to be returned. Am i missing something using SpQuery? Thanks in Advance string siteUrl = ...
3
votes
4answers
2k 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)
1
vote
2answers
961 views

CAML Query to retrieve First Name using Email Id of users in Sharepoint

I am creating a custom workflow which gets activated whenever some data is entered in a particular list. One of the field in this list is a column for Email ID of the a user( not necessarily the ...
1
vote
1answer
265 views

FilterDefinition CamlQuery

I working with custom AlertTemplate. I only want to send an Alert if field "Beställare" or "Agent" contains my UserId I Have tried with this query, but I always get an Alert when something chanches. ...
1
vote
0answers
97 views

How can i enter User information in the Data element of a list instance

For example... <Rows> <Row> <Field Name="ClassName">Programming 101</Field> <Field Name="Attendee">Domain\User</Field> </Row> </Rows> ...