method for querying list data

learn more… | top users | synonyms

2
votes
2answers
3k views

What does the GetListItems query option IncludeMandatoryColumns do?

I found myself working with the Lists.GetListItems method fairly often. Unfortunately, I have never understood what the IncludeMandatoryColumns query option actually does. The documentation seems to ...
5
votes
3answers
319 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 = ...
2
votes
1answer
563 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 ...
0
votes
3answers
104 views
0
votes
0answers
74 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
220 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
1k 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
2answers
585 views

Problem with Calendar CAML Query

i have a problem with a CAML Query for a Sharepoint Online(Office365) Calendar. I try to get all Calendar Appointments between two dates. Here is my code: private void getFreeDays() { ...
1
vote
1answer
234 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
186 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 ...
1
vote
2answers
277 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> ...
0
votes
3answers
4k views

SPServices <today /> not returning correct results

This is the chunch of code that I am working with. I am trying to get only the events (normal/all day/recurring) to show, and it is returning all items for the whole week. Any ideas? ...
1
vote
1answer
476 views

“Not in” membership caml query

In a custom list definition, I'm building a view with this query : <Where> <Or> <Membership Type="CurrentUserGroups"> <FieldRef ...
1
vote
2answers
1k views

CAML OffsetDays

please help if it possible that CAML OffsetDays is not working in DvWP? I use the following CAML within a DVWP: <View><Query> <Where><And> <Lt> <FieldRef ...
1
vote
1answer
839 views

SP2010 JSOM: updating with CAML where clause

So I learned and have used the following to update a list item by ID using Javascript Client Object Model: function updateItem(passedID) { var ctx = new SP.ClientContext.get_current(); var myList = ...
0
votes
0answers
82 views

Filter SharePoint documents based on a Tag filter using the Client Object Model

I am successfully fetching SharePoint documents using a CAML query via the Client Object Model. I would now like to add list of tags as a filter to this query, so that only documents tagged with ...
1
vote
0answers
438 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 ...
2
votes
4answers
13k views

Get Items Under Folder CAML

I am trying to retrive all items that are under a certin folder, in a document library. this is what i have so far List DocumentsList = clientContext.Web.Lists.GetByTitle(list); CamlQuery camlQuery ...
3
votes
2answers
363 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
154 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 ...
2
votes
1answer
231 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 ...
1
vote
2answers
934 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
134 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 ...
0
votes
0answers
27 views

Anyway to know if a List View will breach the Threshold in the near future? (SP2010)

I understand why the LVT is there, how it works and so on, I also get how to order the fields in views to get the query under the threshold. However, is there a simple way to evaluate a list and its ...
1
vote
0answers
108 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
138 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
5k 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 ...
3
votes
1answer
157 views

Needed help to build caml Query with multiple <And>

I am getting a query from list view by view.Query i got the following <QUERY> <GroupBy Collapse="TRUE" GroupLimit="100"><FieldRef Name="AlertGrp" /></GroupBy> ...
7
votes
2answers
700 views

Can a CAML query find all documents that were ever modified by a specific user?

I'm trying to list all documents that were (ever) modified by a specific user, using a CAML query like this one: var query = new CamlQuery{ ViewXml = "<View Scope='Recursive'>" + ...
0
votes
1answer
146 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 ...
2
votes
2answers
127 views

moving list items from wss 3.0 to foundation 2010 using lists.asmx

I'm trying to use Lists.UpdateListItems to move items from a list in WSS 3.0 to a list in SharePoint Foundation 2010. The original list contains several items. The target list does not contain any ...
1
vote
2answers
2k views

Building CAML query with AND and Order by Clause

Hi I am trying to build a query using caml query builder - Below is the query (The query = get the values only whose address = 1234st AND LastName = Doe) - I believe the placement of AND operator is ...
1
vote
0answers
41 views

SP2010 - Visual Web Part - Storing metadata in folders in document libraries

I want to store a number to folders to enforce ordering. I noticed these three pages http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.getproperty.aspx ...
0
votes
1answer
112 views

SP 2010 Visual Webpart - How to get all documents in a folder and sort them by caml query?

I am making a visual web part for sharepoint 2010. I have a SPFolder object and I want to get all items in it, but I want to sort it by a specific field. I want to do this by CAML query instead of ...
8
votes
4answers
3k views

SharePoint 2010 CAML Query fails when indexed columns used

I have an SPQuery that has been working fine until my list hit 500 items: q.Query = "<Where><Eq><FieldRef Name='DefectID' /><Value Type='Counter'>" + DefectID + ...
1
vote
1answer
159 views

sharepoint 2010 - How to get document ID using spservices sql search query?

Using spservices to make search requests, I am building the query like this: var queryText; queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"; queryText += ...
2
votes
1answer
3k views

Get List Items using ECMAscript CAML query

Hi can anyone show me how can I retieve list items based on 2 fields using ECMAscript CAML? I have a list where I have uid as number and city as text. I want to retrieve all items where uid = 100 and ...
1
vote
3answers
1k views

Dynamically hide column list item if the field is empty

I have a series of fields that I would like NOT to appear in my list dispForm.aspx. So when a user creates a new list item if these fields are unpopulated the do not appear DispForm.aspx but I still ...
7
votes
1answer
1k views

Why is my CAML query working in CAML Builder but not in the application?

I have a CAML query that queries a calendar list and I want it to return all the items in the list with an EventDate of today or later, ordered in ascending order. The CAML query I'm using is this: ...
3
votes
1answer
3k views

CAML Query Lookup/Choice Value Type as Text

So, here is some lines of code that i write to retrieve data from Sharepoint list using CAML query. string qryCaml = string.Format(@"<Where> <And> ...
2
votes
2answers
2k views

Why is this CAML Query returning all items regardless of the <Where> element definition?

I'm trying to retrieve a list of items where a specific field matches a specific value. There is likely going to be multiple items returned when the query is successful. Here's what my CAML query ...
1
vote
2answers
8k views

CAML Query on “Person” field type

I would like to query list and get items that were created by specific user, in my list I have the fild "User" of type Person I tried this but it didn't work: <Where> <Eq> ...
0
votes
0answers
35 views

Put a break in javascript function

Hi I have 10 sharepoint lists.structure,column name,data type all are same. I need to check whether a particular item is found in any list then do some action using ecmascript. var ...
1
vote
2answers
126 views

How to write a caml query that filters by .pdf or folders?

How can I write a CAML query (for javascript ecma) that filters by only pdf documents or folders in sharepoint 2010? (this is for document libraries) Thanks.
0
votes
1answer
97 views

How to set a search scope in SPServices search function?

I am doing a search using this code: var queryText; queryText = "<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'>"; queryText += "<Query>"; queryText += ...
3
votes
1answer
2k views

SP2010 JSOM Client Object Model: How to get all documents in libraries including all folders recursively

I have seen a lot of examples and questions about this out there but nothing I have found has helped me accomplish this. I need to be able to grab all the names of the documents within a given ...
1
vote
1answer
587 views

How to filter by only pdf files in querypacket?

In a query packet used in SPServices to do searches on Sharepoint 2010 using jquery, I want to filter the results to only .pdf documents. How can I do that? The below shows all types of files... ...
1
vote
2answers
2k views

How to apply CAML query on the Calculated Column of the list?

I have a calculated column that stores the calculated date value. When I apply the CAML query, it does not return any row even if the record exists. Can any one please guide me on this topic> ...
0
votes
2answers
309 views

foreach loop inside caml query

I have a list of Employee class which has empid and empname as property. Now I want to construct a caml query IN clause where list column id in empid. How can I write a foreach loop inside caml ...