method for querying list data

learn more… | top users | synonyms

2
votes
2answers
84 views

2010: How to query user profiles for custom properties?

Our sharepoint user profiles are configured to have two additional AD synchronized, public custom properties, EmployeeID and CostCenter. I need to read a list of users with the same CostCenter as the ...
1
vote
1answer
78 views

Problem with Caml Query

I need to put this code: <View>"; <Query>"; <Where>"; <Eq>"; <FieldRef Name='PublicY' />"; ...
4
votes
2answers
110 views

Get field values from SiteMapNode when getting Items from PortalSiteMapProvider

I'm trying to query my list using PortalSiteMapProvider. Here is my Code: public List<string> GetChachedItems(string webUrl, SPQuery query) { SiteMapNodeCollection nodeCollection = ...
0
votes
1answer
168 views

Caml Query Filter SharePoint 2013 Online

Hi I'm in need of some help with a caml query. I have 1 column in my list, that have 3 different choice. I want to query out items if the choice is equal to YES This is my code: var context = new ...
1
vote
1answer
98 views

CAML Query to sort a blog Posts list by published date

I have successfully created a CAML query to sort my list by modified date but I want published date instead. Why does replacing "Modified" with "Published" not work? They are both "Date and Time" ...
1
vote
0answers
45 views

Is there a setting on SPField that would prevent it from being included in a CAML query?

I'm trying to build a CAML query for a managed metadata column. I'm following the guidelines provided here by Microsoft. Essentially they say to query for the term's Wssid. No problem, I can do ...
0
votes
2answers
218 views

Filter by projected field in CAML - is it possible?

I have a Dealers list with the following structure: ID | Title | DealerCode and DealerLetters list with lookup column (referencing to the Title field): ID | Title | RegistrationNumber | ...
2
votes
1answer
337 views

caml query to filter by year not working

I would like to filter a list based on the year as parameter. For e.x. if i use 2014, all items from 1/1/2014 to 31/12/2014 should appear and also i am filtering on region. For the caml query below, ...
0
votes
2answers
61 views

CAML : filter items based on FieldType regardless of the Column name

In a CAML query, can you filter items which has values in the column (Not Null), based on the FieldType of the column. regardless of the Column name ?
2
votes
2answers
1k views

CAML query to filter items by Content Type, independent of column name

In a SharePoint list I have a column, created using a custom content type. Let's say, the content types is "MyContentType". I used in a column "My Custom Column". Need to filter out items if the "My ...
0
votes
0answers
23 views

CAML Query file Major and Minor Versions [duplicate]

CAML Query with Five Conditions, I have specified three conditions and two more needs to be added. Both of them should be And. How do I specify file Major and Minor History in the below query ...
1
vote
1answer
540 views

Syntax for including fields dynamically in CSOM query?

What is the proper syntax for including fields dynamically in a CSOM listitems query? For example, this would apparently work: foreach (string field in fields) { clientContext.Load(items, includes ...
0
votes
2answers
131 views

Unable to fetch tasks from all the task lists in SharePoint 2013 using CAML

following is my Query:- SPSiteDataQuery oQuery = new SPSiteDataQuery(); oQuery.Lists = "<Lists ServerTemplate=\"171\" />"; oQuery.Query = ...
0
votes
0answers
194 views

The SharePoint list query is not valid: The required root XML element <RSSharePointList> is missing from the query

I'm trying to query Sharepoint Lists from Lists.asmx. But when inject my CAML query into Query designer it returns me the following error: The SharePoint list query is not valid: The required ...
1
vote
2answers
247 views

Error in my CAML Query? COMException (0x80004005)

I was wondering if anyone could verify or see an error in this CAML query: SPQuery query = new SPQuery(); query.Query = string.Format( ...
1
vote
2answers
285 views

how to populate a cascading dropdownlist using caml query in asp.net using sharepoint list

I want to populate a cascading dropdownlist from a the same SharePoint list using CAML query.
2
votes
2answers
107 views

Query list types using CAML in CQWP query override?

When you export a Content by Query web part and open it up there is the <property name="QueryOverride" type="String" /> tag which allows you to put in your own CAML query to specify further ...
3
votes
2answers
423 views

CAML query for sharepoint list not working

I have a CAML query where I am getting records between a date range for a sharepoint 2010 list through an asmx web method call. It looks like this ...
2
votes
3answers
167 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
2
votes
1answer
165 views

Event Receiver on SharePoint 2010 - How to query DB and display an error message

I'm an absolute beginner of SharePoint development. I would like to create my first Event Receiver and I'm doing with VS2010 (because I'm on SP 2010). I would like to check if adding a new event in ...
0
votes
1answer
134 views

Why is my CAML query for my list view not valid: filtering a date and membership of created by

The below query works only for each segement alone. Either: <And> <Geq> <FieldRef Name="Von"/> <Value Type="DateTime">{startdatum}</Value> </Geq> <Leq> ...
0
votes
0answers
53 views

Get SPListItem by title is very slow

I want to get a SPListItem by title. I´m using a caml query to filter the list (Around 1000 items). There is only 1 item with the title in the list. My problem is now that the performance is really ...
0
votes
3answers
68 views

CAML-Query with Lookups

From those two lists: AVAILABLEDATES -date (DateTime) -maxBookings (Number) BOOKINGS -availableDate (Lookup to AVAILABLEDATES:Id) -User (Person) I need to get all dates that their bookings don't ...
2
votes
2answers
290 views

Looping retrieved Items throws an InvalidCastException

I have some very simple code using the client object model to retrieve a list and all items from that list from a SharePoint 2013 Online site. When the ExecuteQuery() fires, I use Fiddler to view the ...
0
votes
0answers
41 views

How can i create a custom filter from SPD for a Link List with URL(Description) column

I want to create a Custom View using SPD (XSLT List View Webpart and Custom CAML query). What i want is how can i set condition for a URL Description. As can be seen in image below. Document Code ...
1
vote
0answers
500 views

How to query the list using CAML Query to List's multi allow user field?

I have a list in which there is one column which is of type People or Group with multi allow. I have created Item Adding event receiver in which I am checking the entered people value is already ...
0
votes
1answer
78 views

Help with complex CAML query

I am wondering if the following CAML query structure is correct: I appreciate your help. <Query> <CalendarDate><Today/></CalendarDate> <Where> <And> ...
0
votes
0answers
198 views

Filter a list view to get items current user can edit only, not read

I have a list where each item has unique permissions that allow all users to "read" the item, but only users in certain Sharepoint Groups can "edit" the item. I would like to give the users a view of ...
5
votes
3answers
333 views

CAML query on external list: access denied by business connectivity services

I am trying to run a CAML query on a BCS list and getting access denied as an error when debugging the code: SPList CMList = web.Lists[Constants.cmlist]; SPQuery query = new SPQuery(); query.Query = ...
0
votes
3answers
112 views

CAML query with Five Condtion throws an Microsoft.Sharepoint.SPException

string query = <Where> <And> <And> <And> ...
0
votes
0answers
78 views

CAML to find tasks “Assigned To” specific users

I have a task list containing an "Assigned To" SPUser field. Only users in a SharePoint group can be assigned to tasks in this list. I want to iterate through the SharePoint group and find out how ...
3
votes
1answer
264 views

CAML Query works on hardcoded value, but not on variable

I am really new to SharePoint, and I came across an issue that is driving me crazy. I am trying to use CAML Query to get a specific list item. My query works on hard coded condition, but not when I ...
2
votes
1answer
2k views

CAML query limitation of values in IN operator

I have less than 5000 items in my library. I want to get 530 items by ids. So I am using following query. <Where> <In> <FieldRef Name="ID" /> <Values> ...
1
vote
1answer
268 views

Bulk updates to SharePoint Lists

I was recently assigned to make changes to several SharePoint lists that store content for a public facing web site. Due to the SharePoint settings or my VM’s Internet Explorer settings I could not ...
1
vote
2answers
310 views

CAML In clause - Value does not fall within the expected range

I get a 'Value does not fall within the expected range' error from the following CAML. <Query> <Where> <In> <FieldRef Name="ID"/> <Values> ...
1
vote
1answer
614 views

SPServices Autocomplete and dynamic CAML query

I have two Text filter web parts (Project and Customer Name) with Apply Filters button for one list. There is a SPServices.SPAutocomplete on each and it works great. Now, I want to show the values in ...
1
vote
2answers
201 views

How to retrieve the login of the user who checked-out a given file

I am currently developping a C# application which has to retrieve some data from a SharePoint website through a CAML request. I successfully get everything I need except one information : the login ...
2
votes
2answers
5k views

CAML query on Sharepoint List without duplicates

How can I retrieve all elements in a List ignoring duplicate entries So if List A contains: Employee A Employee A Employee B Employee B Employee C Employee D Employee E I want to get ...
1
vote
1answer
1k views

Lookup field value in CAML, Client Object Model

I am using the .NET Client Object Model from a website to access data in a SharePoint list. One of the fields I am trying to access is a lookup field. How do I get the text for the lookup field using ...
1
vote
0answers
458 views

How to filter a list view by SP group membership (CAML, JS, anything)

I have a list. I need to filter the list view in SharePoint to show items: created by someone in current user's group show all to admin group I am using Infopath for the list's form view, and ...
3
votes
2answers
405 views

Caml query with unicode charachter

the caml query bellow don't return the correct result : <Where><Eq><FieldRef Name='ParentLink' /><Value Type='Text'>ⵜⴰⵎⴰⵡⴰⵙⵜ</Value></Eq> </Where> i ...
0
votes
0answers
161 views

SharePoint 2013 custom TimerJob gets no results from list but same code as a console program returns results

Can anyone provide any ideas on why the below query returns nothing when inside a custom timer job. But when run from a console program it returns results. Note, both console program and OWSTimer.exe ...
1
vote
2answers
1k views

Unable to return items under folder using CAML

I have a folder in the default "Images" library under my site, called Menu Icons: /PublishingImages/Menu Icons I want to retrieve only the images under this folder, and not all images under the root ...
0
votes
1answer
65 views

caml query on lists connected by lookup columns

I want to use CAML to query two lists that are connected by a lookup column. If I set the lookup column in List 1 to connect to the Title column of List 2, can I do a CAML query that joins them? Or do ...
2
votes
1answer
138 views

CAML Query throwing error

Pretty new to CAML queries, but trying to query a list based on Status = Completed and a date range. It is throwing the following error "Unexpected Error: One or more field types are not installed ...
2
votes
1answer
246 views

CAML Query Custom Ordering

I have looked around a bit, but have not found any reference to this particular issue. Is it possible to specify a custom ordering in a CAML query? What I mean by this is, say I have a list with a ...
2
votes
1answer
639 views

CAML query join and sort by column of projected fields

I am trying to execute the following query: query.Query =<Where> <IsNotNull> <FieldRef Name='Product' /> </IsNotNull> </Where> <OrderBy> <FieldRef ...
1
vote
0answers
116 views

CQWP bind sorting with query string

Is there a way to use PageQueryString in CQWP to control the sort order and sort by behavior? I am trying to implement this kind of sortable and filterable table with pagination: Would it be ...
0
votes
1answer
144 views

CAML query many-to-many relationship

I have a case where a customer can have many contacts and a contact can be assigned to many customers. Currently I have a page for each customer, on load I get all the contacts (a publishing page for ...
1
vote
3answers
6k views

Get field value from item in SPListItemCollection

I am confused with SPQuery. How can I use it to get listitem values. Let's say I have a list "Cinema" with 20 columns but i only want 4. Film ID Film Name Film Type Film Review How can i get all ...