SPQuery represents a query in a list view.
5
votes
2answers
717 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
5
votes
1answer
892 views
SPList.GetItems query returning an invalid SPListItemCollection. What am I doing wrong?
I'm trying to query an SPList object using a CAML query (see code below).
SPQuery queryGetExistingTargetTask = new SPQuery();
queryGetExistingTargetTask.Query = ...
2
votes
1answer
238 views
Why do I sometimes have to use different SPQuery tags?
Every SPQuery's query should have
<View><Query> query... </Query></View>
tags?
Sometimes I have to put without those tags to get it work and some times I have to put it ...
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
899 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
3answers
940 views
How do I programmatically alter sort and include columns in the “All Items” view?
How to programatically alter existing view "allitems.aspx" aka "All Items" to do an OrderBy (sort by first name and group by department) and only display first, last, m, date of birth, date of hire, ...
1
vote
2answers
914 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 ...
2
votes
2answers
1k views
Maximum lookup columns - the magic number 13
So I did create on an SPWeb 20 custom lists and then a tasks list.
For each of those 20 lists I've created 20 site lookup columns. I then created 20 Content Types based on Task content type. Then I've ...
