method for querying list data

learn more… | top users | synonyms

0
votes
1answer
914 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 ...
6
votes
3answers
4k views

Caml to get today's birthdays

I have a list with birthday field (DateTime). How do I write caml query to retrieve only the records where birthday falls on today (i.e. only comparing day and month value of birthday column to ...
1
vote
1answer
330 views

SPQuery doesn't return all rows

I don't know why i only get one row as per below: When they are 2 rows to be returned. Am i missing something using SpQuery? Thanks in Advance string siteUrl = ...
3
votes
4answers
3k views

Caml query builder Office 365 Sharepoint Online

Does anyone knows where to find a CAML query builder that I can use for Office 365, Sharepoint Online? (if there exists one)
1
vote
2answers
1k views

CAML Query to retrieve First Name using Email Id of users in Sharepoint

I am creating a custom workflow which gets activated whenever some data is entered in a particular list. One of the field in this list is a column for Email ID of the a user( not necessarily the ...
1
vote
1answer
275 views

FilterDefinition CamlQuery

I working with custom AlertTemplate. I only want to send an Alert if field "Beställare" or "Agent" contains my UserId I Have tried with this query, but I always get an Alert when something chanches. ...
1
vote
0answers
102 views

How can i enter User information in the Data element of a list instance

For example... <Rows> <Row> <Field Name="ClassName">Programming 101</Field> <Field Name="Attendee">Domain\User</Field> </Row> </Rows> ...
4
votes
1answer
3k views

CAML query recurrent events problem

Here is the code I use: SPQuery query = new SPQuery(); query.ExpandRecurrence = true; query.CalendarDate = new DateTime(2013, 1, 1); query.Query = @" <Where> <DateRangesOverlap> ...
4
votes
3answers
11k views

How to build a CAML query with where clause

I have this CAML below and i'm tring to do something like this. Where username ='username' and id = 'id' <Query> <Where> <And> <Eq> ...
0
votes
2answers
436 views

Add Timespan to DateTime Column via SPServices (jquery)

I want to increase and decrease a DateTime column from a specific list with jquery and SPServices. Normaly I should first receive the original datatime and then add the timespan and after that save ...
4
votes
4answers
3k views

Help with CAML query

I have the following query but I am not sure if it does what I really want: <Where> <And> <Contains <FieldRef Name='Phase' /> <Value ...
0
votes
2answers
719 views

FullTextSearch: SPSiteDataQuery on each request vs. caching data and filter in code

I'm implementing a full text search on list contents. Is it more efficient to fire a SPSiteDataQuery on every request with a dynamically built CAML-Query, to filter the items? Or is it better to ...
3
votes
2answers
2k views

CAML: Possible to query non existing field?

I'm using SPSiteDataQuery to fetch list contents from 2 different lists. List A) has the fields CustomField and Title List B) has only Title Is it possible to build a (filter) query with ...
7
votes
1answer
7k views

CAML query for field of type “Person or Group” which allows multiple selections

Consider a list which has a column of type "Person or Group" (single selection) witch contains a SharePoint group. I want to return all rows for which the group is within a list. I know the IDs of the ...
2
votes
2answers
346 views

Is there any guidance on designing lists for efficient CAML queries?

I'm designing some lists that may well contain thousands of items, and I'm trying to come up with the best design for efficient querying. I'm looking for some form of (hopefully Microsoft) ...
1
vote
1answer
842 views

How to Retrieve Numeric Column value from SharePoint List

In the SharePoint list I am having the numeric column and the value is like this 123,456,789,012,346,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000. I am using SPQuery to retrieve items ...
1
vote
1answer
586 views

SharePoint 2007 Error - some part of your SQL statement is nested too deeply

Im working with an application on SharePoint 2007, I encountered an issue where the list item unable to view. It hit error 1309 "Some part of your SQL statement is nested too deeply. Rewrite the ...
0
votes
3answers
1k views

What's wrong with this CAML query?

The And block of Field3 is being ignored. It doesn't matter if the text matches or not. What's wrong here? <Where> <And> <Eq> <FieldRef Name='Field1' /> ...
2
votes
1answer
903 views

Dynamically adding And to CAML query

I have the following "base" query: <Where> <And> <Eq> <FieldRef Name='Field1' /> <Value Type='Boolean'>1</Value> ...
4
votes
4answers
8k views

CAML query not working

I have written following CAML query to Retrieve items which are due in 7 days, It doesn't seems to be working, Please let me know what I missed ? string internalEndDate = web.Lists["List ...
0
votes
3answers
326 views

Custom Lists: how to retrieve 3 most recent item submissions

I have currently 2 custom SharePoint lists. One represents questions, the other one answers. Both lists have the default columns in place: ID, modified by date and username. The requirement is now ...
1
vote
2answers
2k views

How to get List Item from sharepoint list based on ItemID

Dynamically I am adding radgrid to the page. I need to retrieve list item from the SharePoint list. Say I have 10000 items in the list using SPQuery, I will get filtered records as 2000 items. Here ...
1
vote
0answers
73 views

Update SharePoint field with XML illegal characters using caml [duplicate]

Possible Duplicate: How to query using CAML when a value has < in the value I am trying to update a field named Title using caml query. The value that i am trying to put is ...
1
vote
1answer
385 views

Are CAML queries a proper way to do a full text search

Let's assume that enterprise and fast search are not an option. Are CAML queries (with CONTAINS operator) a proper way to do a full text search in fields of a publishing page? Or is that for any ...
1
vote
1answer
118 views

WebPart which displays a list with information about pages: What is the best way to search/filter this list

I have a webpart, which displays a list with information (title, creation date) about publishing pages under the current web site. Above this list there should be a search form (filter) to search ...
2
votes
1answer
2k views

CAML query Lookup column value

I have a simple list represent a hierarchy. The list columns: ID, Title, Parent, other columns. Where Parent is a lookup column back to the list itself and get information from the Title column. In a ...
2
votes
1answer
332 views

Duplicates of SPListItem when two quick requests occur

We got code, running on page load. That code asks certain SPList for its items by CamlQuery, which gets only items with specific (current) user in one field (field A) and with some value in other ...
0
votes
1answer
1k views

dynamic CAML query in DataView web part

I need to generate a dynamic CAML query for DataView web part. My requirement is similar to what is mentioned at: http://stackoverflow.com/questions/1985560/sharepoint-dynamic-caml-query-problem . ...
1
vote
2answers
522 views

How to order all day events on a calendar

I have a calendar list with a choice called "Category" with items A,B,C,D. I want to sort the all day events that are shown based on the selected category. I tried to set the Orderby ...
1
vote
2answers
655 views

SharePoint 2010 - Find WebPart in WebApplication

I´m searching for an good way to find the ContentQuery WebPart in my WebApplication. My plan is to write a PowerShell script and create a url list. I found the following possible ways: SharePoint ...
0
votes
2answers
395 views

How can i access sharepoint using LINQ instead of CAML?

is there any way to access Sharepoint lists via LINQ instead of CaML?
0
votes
1answer
2k views

How to get folder structure including items from list, without using webservices

I have a list containing folders and items. The folders are a custom content type based on folders, with some extra columns like URL and some Yes/No Checks. One contenttype can contain n items and ...
0
votes
2answers
758 views

Logical OR CAML Query not working

I have a query that I've written like this: <Where> <Or> <Neq><FieldRef Name='Status'></FieldRef><Value Type='Text'>Created</Neq> ...
2
votes
2answers
5k views

CAML error: “One or more field types are not installed properly.”

I'm using the U2U CAML Query Builder tool and no matter what I do, I can't create a query. It keeps generating the error: One or more field types are not installed properly. Go to the list settings ...
0
votes
5answers
7k views

Jquery to get list items from sharepoint list

I have a work from my time to use jquery with sharepoint. I have written the code to get list items. When I run in IE it dosen't show any errors to me, but I am not getting the results. Can any one ...
6
votes
1answer
2k views

Need help with CAML in CQWP

I tried to implement a CQWP web part that could show me all the checked-out files following this guide: ...
2
votes
1answer
2k views

How to make a CAML Query union?

I have a webpart with several CAML Querys that look like this: SPSiteDataQuery qry = new SPSiteDataQuery(); qry.Lists = "<Lists ServerTemplate='104' Hidden='TRUE' />"; qry.Webs = "<Webs ...
1
vote
1answer
187 views

Is it possible to find out what template was used to create a site using the SOAP service?

I am connecting to a SharePoint 2010 server(which I don't control) using the SOAP service (.asmx) I need a list of sites which were created using a certain template. Is it possible to create a CAML ...
2
votes
4answers
7k views

How to check if a folder exists in a list?

I have the following code: SPFolder oFolder = myList.RootFolder.SubFolders[folderName]; if (oFolder == null) { Console.WriteLine("FOLDER NOT FOUND"); ...
0
votes
1answer
1k views

User Information List Add item programmatically

I'm using a CAML batch file to add items to a list using SharePoint List Web Service on my InfoPath form. The batch file is like this: <?xml version="1.0" encoding="UTF-8" ?> <Batch> ...
0
votes
1answer
2k views

How to get Highest ID using CAML and JQuery

I am using a web service and am trying to return the highest ID number from the Posts list with viewname {B9212691-1AF1-41AF-9DA7-6073ADDB091B}. So far I have the following. <script ...
1
vote
1answer
436 views

Can the CAML Query in A View be modified to use the Username or UserId of the currently logged in user?

On a MOSS 2007 Team Site, I used the Web UI to add a View, and used the Web UI to filter it in order to fetch the items where Title equals ACME\Joe. <Query><OrderBy><FieldRef ...
1
vote
1answer
811 views

CAML Query for getting all files underneath a folder with treepath

I tried the U2U Caml Query Builder but I think it doesn't use the Recursive-Attribute the right way. I'm trying to build a query for getting all files underneath a folder (there a several folders ...
4
votes
4answers
896 views

CAML query error when creating SPQuery query

I have this CAML query var query = new SPQuery{ Query = string.Format(@"<Where> <Or> <Or> <Or> ...
0
votes
2answers
3k views

Pass a standard list view a CAML query, is this possible?

I have a standard list in Sharepoint 2010. The list has a standard view, but technically the view could even be custom built. Is it possible for me to pass through a CAML query from a web part I've ...
1
vote
1answer
570 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 ...
2
votes
3answers
4k views

Querying for Approved (Published) List Item Data

My scenario: I have a page layout that has a user control on it. This user control queries data contained in other pages within the site collection to show a summary of related information. Anonymous ...
0
votes
3answers
3k views

How to select MAX field in CAML query

RowLimit seems not working. I'm using it in CAML query to run a SSRSreport. I have to pick the Max date for each user. i sorted the user as descending and set the RowLimit element as 1. But that does ...
0
votes
1answer
373 views

External CT Related Lists - Examples - CAML - LINQ to SharePoint

I'm trying to return related data via External Content Types. I was wondering which is better to use, CAML queries or LINQ to SharePoint? I'm fine with writing CAML queries besides the relating part ...
3
votes
3answers
791 views

SharePoint 2010 equivalent to SQL Profiler?

Is there a way to view the CAML that is running on a SharePoint 2010 installation? A bit like how you can monitor SQL running on a database with MS-SQL Server - is this possible with CAML and ...