SPQuery represents a query in a list view.

learn more… | top users | synonyms

2
votes
1answer
2k 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. ...
0
votes
1answer
31 views

GetItems Ignores ViewFields in Query

I have created the following method to fetch list items from a list. The method does return the right items, but no matter what I provide in the viewFields parameter, it always returns all fields. ...
0
votes
1answer
62 views

SharePoint 2010 Workflow Tasks SPQuery

I have a list item that gets triggered daily to send a workflow task. I created a web part to search based on different column values of the list item and the tasks. Currently: It goes through the ...
0
votes
1answer
339 views

How Does Calender List DateRangesOverlap <Today/>,<Month/>,<Year/> and <Week/> exactly work?

I have a SharePoint calendar list which has some recurring events i wanted a report of about last two years. Following is the code that i have written SPQuery qryBookings = new SPQuery(); ...
0
votes
1answer
90 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
1answer
268 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
1answer
243 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
34 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 ...
2
votes
0answers
56 views

SPQuery returns wrong values

The Setup I have a list with 2 extra columns. Target Audience: Choice (Relevant/Everyone) Tags: Managed Metadata field (multiple) When I choose in the "Target Audience" field "Everyone", this ...
2
votes
0answers
103 views

Join SPQuery in list

List 1 "Posts", fields Title body #comments modified in this list #comments fields is look up from another list Comments: List 2 "Comments", fields title body comments post ...
2
votes
0answers
52 views

Mysterious DBCS (Double-Byte-Characters), i.e Kanji from SiteData query

Records returned from SPWeb.GetSiteData have some fields encoded in DBCS (Kanji characters). What could be causing this?
2
votes
0answers
2k views

How to get the particular columns from a SharePoint list view

I am using SPQuery to fetch data (particular columns from the list based on viewID) from SharePoint list. Here is the code for fetching the data: SPQuery sQuery = new SPQuery(); currentlistview = ...
1
vote
0answers
319 views

SPSiteDataQuery without subfolder items?

I'm trying to use the SPSiteDataQuery to return the contents of several lists across a site collection. The problem I'm having, though, is that while there are only a few documents at the root level ...
1
vote
0answers
199 views

SPQuery on ECT very slow

I am creating a custom web part which is supposed to return results from an External Content Type(ECT) List which contains almost 40,000 records. There are multiple ways the items can be searched and ...
1
vote
0answers
124 views

How to display fields of parent list and foreign list using spquery

I have created parent list that lookup to another list . Both the list having one identical column label but different values(column name: displayorder).I projected the displayoreder column from ...
1
vote
0answers
536 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
0answers
9 views

Show all events ([today]) in Listview including “Recurring events”

I need a calender, which I can filter for events that take place [today]. The recurring events are not showing, when filtering for [today] and StartDate. Is it possible to have such a view with CAML ...
0
votes
0answers
26 views

Restrict SharePoint Results

We want to restrict the shown subsites in our result search webpart to only the first subsite and not all subsites in the subsite. I try to explain it to you with a example... We have a Site ...
0
votes
0answers
35 views

List View Threshold error

I have a unique problem. I'm getting LVT error when running a script that displays every users' files that they have checked out across all libraries in a web scope in production. Here are a few ...
0
votes
0answers
129 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 ...