caml

Get Max Date Using CAML Query From alist

Dear all, how can i get max Date and Min Date from a list Date Column ...

SharePoint: How to get Top 5 records by using CAML query from a list.

Hi there, I have already created a webpart to show the data from list, but I really want is to only show top 5 records from that list (by using CAML query). Does anyone know how to do this? Many thanks. <Query> <OrderBy> <FieldRef Name='ID' Ascending='False' /> </OrderBy> </Query> ...

CAML Query Help?

Is there a way to get all versions of list item(s) using a CAML Query? ...

SharePoint problem using a Feature with AllUsersWebPart node

I have a SharePoint feature that installs a new page layout. A requirement for this feature was to install the page layout with a default web part, so that when the user runs through the 'Create Page' action, the page is created with a web part already on the page. So, I've tried adding a AllUsersWebPart node in the Elements definitio...

How do i represent an image through CAML?

How do i represent an image through CAML? I have a list and im trying to create a list instance by adding data through CAML <Data> <Rows> <Row> <Field Name="Title">Promotion 2</Field> <Field Name="Promotion Image">/SiteCollectionImages/PR.gif</Field> </Row> </Rows> </Data> ...

Sharepoint Lists.asmx: query returns deleted items?

Hello All, While running caml query's against the sharepoint list.asmx service, I have this strange behaviour that the GetListItems method also returns deleted items; found item: test found item: already done found item: recurring found item: recurring event 3-4 found item: Deleted: recurring event 3-4 found item: Deleted: recurring ev...

CAML query to add a ListItem in Sharepoint

Hi, my CAML query to add a ListItem (Wiki Page) doesn't work. I've tried serveral fields, but Sharepoint always creates empty pages. Here is my CAML so far: <Batch OnError="Continue"> <Method ID="1" Cmd="New"> <Field Name="WikiField">My Wiki Content</Field> </Method> </Batch> ...

How to create a wiki page (=item) in Sharepoint programmatically?

Hi, how do I create a wiki page and add a title, as well as some content in sharepoint (via webservices)? This is my SOAP message so far: <soapenv:Body> <soap:UpdateListItems> <soap:listName>Cooking Wiki</soap:listName> <soap:updates> <Batch OnError="Continue"> <Method ID="1" Cmd="New"> <Field Name="...

sharepoint webpart with caml and xslt

How can i create a sharepoint webpart that accesses a List, and that can have CAML applied to it. The CAML is needed to display return only list items that have the field with "Position" > 0 i also need the webpart to have xslt applied to that. ...

How do I get recurring SharePoint Calendar List Items

Im running this query on the same server as the web application, so SPQuery.ExpandRecurrence should work. However, with the following I only get 3 items in the returned list collection vs. the 3 items and the re-occurrences, all of which fall within the current month. I did verify with Stramit Caml Viewer that the query works, and retu...

CAML Query

I'd like to have a CAML query to get the events from a calendar list. I want to get all the events including Today in the upcoming 30 or so days. So far I have: <Where> <DateRangesOverlap> <Geq> <FieldRef Name=\"EventDate\" /> <Value Type=\"DateTime\"> <Today /> </Value> </Geq> <FieldRef Name=\"...

sharepoint validate custom field

I cave created a custom list in sharepoint (created and provisioned to the 12 hive) how can i perform validation on certain fields of the list when a new list item is added? i think i can do it through the "itemadding" event reciever, but is there a more elegant sharepoint way? eg i just want to check an email field has a valid email ...

redirect item added in sharepoint list

how can i redirect to a "Thank You" page after a user has entered a new item into a custom list that I have provisioned. one way i can think of is in the item adding event receiver but is there a CAML way of doing it? ...

CAML GroupBy usage when querying a list using the SPQuery or SPSiteDataQuery object

I'm not sure how to use the GroupBy clause when querying a list. The SPListItemCollection or datatable looks exactly the same regardless of the groupby clause. SPQuery query = new SPQuery(); query.Query = "<GroupBy><FieldRef Name=\"Area\"/></GroupBy>"; DataTable result = list.GetItems(query).GetDataTable(); // result.Rows.Count = Same...

Difference between StaticName and InternalName (in the SPField class)

I want to make a CAML query semi-smart - in that I can give it a Title (which is what the end user sees) and it looks up the appropriate "Title" to pass as part of the CAML query: var caml = "<OrderBy><FieldRef Name='" + field + "'/></OrderBy>"; It looks like I can iterate of the Fields collection of the list using the object model, a...

Default Content Type and Content type order using Folders in a Sharepoint List

I have a Custom List Definition (schema.xml) i have set up Site Columns (through A feature) and numerous content types also through a feature, this all works fine. I have a list definition (schema.xml) and i have put the content types at the top in the order i want them to appear (assuming that the top content type will be the default fo...

Batch Element in Sharepoint to Delete a List item when you do not know the ID

I want to delete an item in a list when it matches some critera using UpdateListItems web service. I dont know the ID of the list item that I want to delete but do know the criteria. For example in SQL I could do: DELETE FROM listName WHERE LastName='Bauer' AND FirstName='Jack' How would you write a Batch Element to do this? Update ...

Sharepoint CAML Date query

Hi, im getting different results based on the date i use to search on. Here are the 3 records i want to display, their values for EVENTDATE, and ENDDATE are as follows 1, 2009-08-11T00:00:00Z, 2009-08-14T23:59:59Z 2, 2009-08-11T00:00:00Z, 2009-08-14T23:59:59Z 3, 2009-08-14T20:00:00Z, 2009-08-14T22:00:00Z When i search for a time betw...

Determine the Next SPListItem ID in a MOSS SPList?

Hi, I am trying to determine what the ID of the next list item to be created in a MOSS list will be. Is there any way of doing this? Thanks, MagicAndi ...

0x81020014One or more field types are not installed properly. Go to the list settings page to delete these fields.

In sharepoint when trying to update a list I am getting the error: 0x81020014One or more field types are not installed properly. Go to the list settings page to delete these fields. The Caml that is being created is: <Batch PreCalc='TRUE' OnError='Continue'> <Method ID='1' Cmd='Update'> <Field Name='ID'>4</Field> ...