Questions tagged [spsitedataquery]

15 questions
3
votes
1 answer

How to programmatically get pages which is pending for approval?

I having a Site with multiple SubSite inherited, each of the SubSite got a default Sharepoint approval workflow attached on Pages Library, therefore, whenever the pages is submit for approval, there will be a task created in Workflow Tasks List on…
sams5817
  • 1,037
  • 10
  • 34
  • 49
2
votes
0 answers

getting actual column types from SPSiteDataQuery

I'm trying to query a site collection for documents of a certain user the query works fine, but the columns in datatable returned are all string columns, and when you try to sort a column which represents a number - the sort result is wrong. is…
2
votes
2 answers

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…
wefwfwefwe
  • 3,382
  • 1
  • 21
  • 24
1
vote
1 answer

Paging in SharePoint with SPSiteDataQuery

I'm attempting to write a WebPart for SharePoint that will display a list of the most recent uploads and modifications to the Site (including all Document Lists) To that end I have created an SPGridView and I am using an SPSiteDataQuery to populate…
J.C
  • 11
  • 2
1
vote
1 answer

SPSiteDataQuery: Filtering Content Types in SharePoint 2010

In SharePoint 2007 executing a SPSiteDataQuery with filter for content types worked as expected. SomeContentType In SharePoint 2010 the same query…
Stefan
  • 14,530
  • 4
  • 55
  • 62
1
vote
1 answer

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…
skolima
  • 31,963
  • 27
  • 115
  • 151
1
vote
1 answer

SPSiteDataQuery and Look-up column

I have a requirement of iterating multiple tasks list under SharePoint sites and sub-sites. I am using SPSiteDataQuery for achieving this. I am having an issue in fetching the data when the column is of type look-up. I am using following…
1
vote
1 answer

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…
PushCode
  • 3,077
  • 4
  • 25
  • 26
0
votes
1 answer

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.
Johan Leino
  • 3,473
  • 1
  • 26
  • 27
0
votes
1 answer

filter items by Site name and List Name using SPSiteDataQuery

I am listing files from multiple folders using the below code: SPSiteDataQuery q = new SPSiteDataQuery(); q.Lists = ""; q.Query = "
ehabzag
  • 99
  • 2
  • 11
0
votes
1 answer

SharePoint 2013 - Getting SPSite.Url from SharePoint DB

I'm working directly against the SharePoint DB (I know it is highly not recommended but I need to, for several reasons). I'm trying to get the SPSite.Url property ("http://baseurl/sites/somename") but can't figure out how to do that. I can only find…
Amir M
  • 508
  • 1
  • 8
  • 28
0
votes
1 answer

How to to add a Content Query WebPart programatically and use a SPSIteDataquery?

This is the current scenario. I have a central site called: XXX. I have many subsites called with the year name: 2012, 2011, 2010, etc. In the central site I have a list called Beneficiaries. In ALL year sites I have a list called Request, every one…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
0
votes
2 answers

"The property Query contains an invalid value." - I can't see it

query.Query = @" [LONG GUID]
user1017882
-1
votes
3 answers

SPQuery calculated fields filter does not work in SharePoint 2007/2010

I have a calculated field in my list and I am trying to use filter on this field. For some reason, the following query always returns all items instead of a filtered item collection: var spQuery = new SPQuery { Query =…
Moon
  • 33,439
  • 20
  • 81
  • 132
-1
votes
1 answer

How to use SPSIteDataQuery to get all site collection list Having same column name?

I am having one site collection that has two sub sites subSite1 and subSite2. subSite1 Having List EMP_info with Column name Title and Dept. subSite2 Having List DEPT_info with column name Title and Dept_ID. I want to show List EMP_info and…
Mohsin
  • 1
  • 3