spsitedataquery

SPSiteDataQuery problem with Eq on Number fields

Ok, so what I wan´t to do is to perform a SPSiteDataQuery that gives my all the SPListItems which are of a certain content type and with the field Year of 2008. <Where> <And> <BeginsWith> <FieldRef Name="ContentTypeId" /> <Value Type="Text">0x0101010053B766E295F2456DA0470906DC0E36F9</Value> </Be...

need to convert SPQuery on a single document library to SPSiteDataQuery on all document libraries in the site

I need help converting the following code snippet to use SPSiteDataQuery instead of SPQuery b/c I need to query accross all Document Libraries in the site. Here's the original code: using (SPWeb oWeb = new SPSite(properties.SiteId).OpenWeb(properties.RelativeWebUrl)) { SPList oList = oWeb.Lists["Qual...

Getting URL for item using GetSiteData in Sharepoint

I'm using web.Site.MakeFullUrl((new SPFieldLookupValue(row["FileRef"] as string).LookupValue)) to get the URL to results in a GetSiteData query. For some items this works fine, but for others I get results like http://server/Lists/My%20Message%20Board/Test/9_.000 - which always 404s. The urls always end in n_.0000. Does anybody know wh...

Can a SharePoint Calculated field check for existence of other columns?

I want to use OrderBy in SPSiteDataQuery to sort items by data, however, the field containing the date differs between the content types. Can this be solved by sorting with a calculated field? I am currently trying to create a calculated field that checks for existence of a field (using ISERROR), if it is found it returns the value, oth...

SPSiteDataQuery: Filtering Content Types in SharePoint 2010

In SharePoint 2007 executing a SPSiteDataQuery with filter for content types worked as expected. <Where> <Eq> <FieldRef Name='ContentType'/> <Value Type='Text'>SomeContentType</Value> </Eq> </Where> In SharePoint 2010 the same query only returns items from one list. A possible workaround would be to filter on the content ...