SPQuery represents a query in a list view.

learn more… | top users | synonyms

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. ...
1
vote
0answers
400 views

Is there a simple way to add paging to ListViewByQuery ?

I'm working with a ListViewQuery component on a webpart and I need to add paging control to it. Is there a simple way to achieve that ? I saw somewhere than just setting the RowLimit property of ...
0
votes
4answers
3k views

Detected use of SPRequest for previously closed SPWeb object after SPQuery

this code run yesterday very well and today I've been trying to solve this error for hour now : Please close SPWeb objects when you are done with all objects obtained from them, but not before I ...
0
votes
2answers
2k views

How can use API to get all Publishing pages in the site collection using a specific Content Type?

I need to use API to return all Publishing pages using a specific content type in a publishing site. this includes querying all sites in the site collection. Can I do that with SPQuery? I am using ...
0
votes
1answer
5k views

Get the SPListItems using SPList.GetItems(SPQuery)

I have a requirement of filtering the data from the SPList (ex:20000 SPListItems) and I bind it to the radgrid. I want to get first 200 and next 200 of every page click in the radgrid. This is my ...
0
votes
1answer
678 views

SPDataSource for asp gridView returns nothing?

I'm binding my SPDataSource to an ASP:DataGrid but it returns empty gridview not filled. Here's my aspx file <SharePoint:SPDataSource runat="server" ID="SPTypes" DataSourceMode="ListItem" ...
0
votes
3answers
838 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 ...
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 ...
0
votes
2answers
2k views

Error while trying to query the custom list sharepoint 2010

I am trying to query a custom list and getting the following error: At, SPListItemCollection OsplistitemCollection = Olist.GetItems(OqueryResponse); below is my code string TicketID = "123"; ...
0
votes
1answer
859 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 ...
0
votes
1answer
49 views

Performance : Caml query taking long time to load or something else

I have a CAML query which provides a result, if a SPfolder exists or not. When i do the item.Count it takes around 2sec for the line to execute . What is going wrong and taking long time to execute ...
0
votes
1answer
67 views

Powershell : Query Document Exclude Document Set

I have a Document Library contains multiple Document Sets, each of the Document Sets contains Files. Document Library ----> Document Set ----> Files My objective is to query all File Name only ...
0
votes
2answers
308 views

Filter List for DateTime using CAML against Calculated Field

In WSS 3.0, I have a list with a Calculated Field, 'MaxDate'. It gets the greater of two other dates, Notional Date and Override Date. I am trying (and failing) to build a CAML query to get all items ...
0
votes
1answer
106 views

How to list all alements by CAML to SPGridView

Is it possible to display the listitems retrieved from a CAML query in a SPGridView? How can I implement it?
0
votes
2answers
263 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
2k views

How to set caml query for special view?

I have a list with 3 views. I want find special items of this. I use SPQuery for it. <Where> <Eq> <FieldRef Name='TypeTitle' /> <Value ...
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 ...
0
votes
1answer
825 views

Join two list using multivalued lookup field with spquery

I have joined two lists with the lookup that allow single value using spquery.join. can any one help me to do for multivalue lookup
0
votes
1answer
33 views

SPQUERY returns null value

Hi im using sp query to retrieve the items and using projectproperty.Title to get the web name dynamically ,but I got empty value in this data table. q.ViewFields = "<FieldRef ...
0
votes
0answers
75 views

_ModerationStatus on list items is always draft from SPQuery

I am querying for list items in a timer job. The list has moderation enabled. It has various list items that have different approval status (e.g. scheduled, approved etc.). However the query always ...
0
votes
0answers
72 views

Expand SharePoint Calendar Recurring Event in SSIS Project using CAML

Is it possible to expand recurring SharePoint calendar events using a CAML query in a SharePoint List Source using the SharePoint adapter off of Codeplex? I have been searching all day and found many ...
0
votes
1answer
217 views

Which of these is the best way to get a list item collection?

Performance-wise which of these methods is the best way to get a list item collection, and why? SPList list = web.getlist("listurl"); SPListItemCollection items = list.getItems(query); ...
0
votes
1answer
151 views

CAML query to select users IDs

I'm trying to select users ids from custom tasks lists. All users are in one SP Group and I need to collect users Ids that doesn't have tasks. query.Query = string.Format("<And><Membership ...
0
votes
1answer
31 views

quick way to access splistitem in different list?

I have 2 lists: listA and listB listA has 2 fields: Title (text) PortalID (text) listB has 3 fields: Title (text), listAField(lookup to listA Title field) UserID (text) I have a UserID value ...
0
votes
2answers
159 views

Dynamic SPQuery

I want to build search criteria by using SPQuery object that searches a list. On application page, there are two textbox Controls, 2 combobox Controls and 2 people picker Controls. The search criteria ...
0
votes
0answers
104 views

spquery.query cannot be charged correctly

I'm charging my spquery with different parameters from a static class called Fields : In fact I'm using this query to bind result data to my asp:grid view using (SPSite mySite = new ...