Tagged Questions
0
votes
1answer
25 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?
2
votes
1answer
145 views
Caml Query - skip X first results
Let's assume I have list with 100 items. Is it possible to write CAML query to get 5 items, but skip 10 items from the beggining? Something like LIMIT and OFFSET in SQL?
2
votes
2answers
190 views
Get SPQuery TotalItems from query
I want to get the total number of items that match my Query, BUT also limit the results.
So say I have 100 items in the list.
50 of the 100 items in the list match my query.
I want to only get 10 ...
1
vote
2answers
221 views
SPQuery always returns values
I am trying to check a list for related values but for some reason every item in the list is returned each time. I have seen this issue before and for me its always meant a bad CAML string but I have ...
0
votes
2answers
186 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 ...
1
vote
2answers
442 views
Simple SPQuery throws error
I am trying to pull populate a lookup field using a lookup value without the lookup ID. I am getting the error: "One or more field types are not installed properly. Go to the list settings page to ...
0
votes
1answer
844 views
Adding IsNotNull and ViewFields in CAML Query
Trying to add IsNotNull parameter and ViewFields paramter but throwing an error. Am I inserting incorrectly or missing something to make sure this executes correctly? Seems like View is bring back all ...
0
votes
3answers
390 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
181 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
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 ...
1
vote
0answers
983 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
446 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 ...
1
vote
1answer
443 views
How do I select only top level folders using CrossListQueryCache?
I want to select the list of folders (without subfolders, not recursive) of a Document library using CrossListQueryCache.
Everything is working fine except that i am receiving ALL the folders and ...
6
votes
2answers
2k views
Can I order by Content Type in a CAML query?
Is it possible to order by content type in a CAML query?
I seem to always get the same result no matter what I do with the Order by. Ordering by ID instead works perfectly.
query.Query = @"
...
3
votes
1answer
2k views
How do I query a list using CAML and SPQuery?
I have a SPList but I don't need to go through everything in that list. I need to establish a CAML query so I can limit the list items. Then, go thru each item from the query result and do something. ...
5
votes
2answers
716 views
Problem with CAML SPQuery ItemChildCount result
I know that this query works fine
SPQuery query = new SPQuery();
query.Query = "<OrderBy><FieldRef Name='ItemChildCount' Ascending='FALSE' /></OrderBy>";
But my ...
1
vote
2answers
3k views
Create CAML SPQuery to order by ItemChildCount in descending order
How do I create a CAML query to display all items on the list order by ItemChildCount?
Somewhat like this:
Select *
from table
order by itemChildCount descending
4
votes
1answer
3k views
CAML query with more than multiple AND/OR generates SPException “One or more field types are not installed properly. Go to the list settings page to delete these fields.”
I need to build a CAML query at runtime based on user input. The CAML query could be as simple as
<Where>
<Eq>
<FieldRef Name="Status" />
<Value ...
2
votes
3answers
895 views
CAML Query Maximum Size
I am running a sharepoint caml query where I want to check that a field on an item is equal to one of many values. I do this dynamically and may wish to check against many hundreds of values.
I found ...
2
votes
1answer
1k views
CAML 'Endswith' equivalent?
I have to pull the data from the custom list by using a CAML query.
I would like to use the "Endswith" option in the CAML query however it seems to be unsupported in sharepoint 2007.
What would be ...
2
votes
2answers
727 views
CAML OrderBy and managed metadata
I have something like this:
SPQuery query = new SPQuery();
query.Query = "<OrderBy><FieldRef name=\"MyTerm\" /></OrderBy>";
myList.GetItems(query);
I can sort on normal fields, ...
1
vote
2answers
911 views
How to get the last x number of splistitems changed for a SPWeb
I'm trying to pull back the last x number of list items in all non-hidden lists for a given web.
My original code would go through all lists and run the following code:
SPQuery query = new ...

