method for querying list data

learn more… | top users | synonyms

0
votes
1answer
113 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 ...
0
votes
1answer
147 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 ...
1
vote
1answer
162 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 ...
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> ...
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 ...
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 ...
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
128 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
98 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 += ...
0
votes
2answers
286 views

Filter List for DateTime using CAML against Calculated Field

In WSS 3.0, I have a list with a Calculated Field, 'MaxDate'. It gets the greater of two other dates, Notional Date and Override Date. I am trying (and failing) to build a CAML query to get all items ...
1
vote
1answer
591 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... ...
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
2answers
905 views

How to apply CAML in SharePoint view

I'm using SharePoint client object model and trying to query specific view but not getting the correct method to do so. Here is my code, using SP = Microsoft.SharePoint.Client; using ...
0
votes
2answers
311 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 ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
1
vote
1answer
516 views

How to get only the first x items starting at position y from a list, using CAML query?

In sharepoint 2010 client object model in javascript, I want to create a caml query, that can download items from a list. I have this part working, but I want to download only x items, not the whole ...
1
vote
1answer
1k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value ...
1
vote
1answer
479 views

Help converting XmlNode to DataSet/DataTable, from SharePoint Web Services, Lists.asmx

This is my first post here, but used this site a lot :) My question is how I can convert an XmlNode, obtained through the Lists.asmx SharePoint web service, to a DataSet / DataTable. The reason I ...
0
votes
2answers
1k views

How to check checkboxes in caml query?

In SharePoint 2010 client object model (JavaScript), I am using this caml query to download list items. There is a column called 'Office' and in it, there are several check boxes (i.e. its a ...
0
votes
2answers
460 views

How to get display name from created by field in sharepoint client object model?

In my sharepoint javascript code, I am retrieving items from a list in my SP 2010 environment. I used a camel query to download specific fields. One of the fields was created by (person who created ...
1
vote
0answers
107 views

getting top X items in each folder with a CAML Query

i'm trying to do a visual representation of a document library using javascript and webservices. basically i want to present the folders in the library, with a preview of the first few files in each ...
2
votes
2answers
874 views

Caml query to get the next event from calendar

I'm facing a problem building a caml query for the calendar list. Here is my caml query SPQuery query = new SPQuery(); StringBuilder sb = new StringBuilder(); ...
3
votes
1answer
527 views

CAML Query on a Lookup Field that points to a Calculated Field throws Exception

I wrote some CAML Queries to get data from a List that has lookups on another List. All is working fine as long as I do not reference a Lookup Field which points to a Calculated Field. I tried ...
0
votes
1answer
75 views

Problem with multiple text filters

I have a custom list that has a text filter connected to allow the user to filter one of the list columns. I now need to add a second XOR text filter to allow the user to filter on a different column ...
0
votes
1answer
4k views

CAML Query to get Lookup field value

I've written an autohosted-app to show a few data that are in a list. To get the data in the list, I use this piece of code with a CAML Query. using (var clientContext = ...
1
vote
2answers
153 views

CAML Query works in my VS2010U, but not on anybody else's computer

I have a list with records uniquely identified by project numbers. This is column 5 - Col05 in my list. It works fine when I run the code, and I am getting the expected record. I can also read the ...
0
votes
1answer
102 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?
0
votes
2answers
464 views

CAML Query returning null

I'm very new to sharepoint and have the following query on my Shared Documents. It is returning null for all three documents I have. I'm wondering where to check in database to see if values are null ...
1
vote
1answer
182 views

How to create field with formula using CAML XML

Suppose I need a DateTime field that shows the current date + 30 days
0
votes
3answers
269 views

CAML Query: use the value of a property of a lookup

My project consists of two lists: a list of documents. This list has an SPUser field that determines who is responsible for that document. a list of projects. This list has a multiple lookup to the ...
2
votes
1answer
220 views

Can we query and fetch data from LIST between different subsites using CAML Query.?

Have LIST created under one site, can the same LIST be used to fetch data from other site using CAML Query.? eg: Consider a LIST "xxx" created under SitePages/AAA/Lists/ Can i access the LIST "xxx" ...
0
votes
1answer
1k views

Search for specific folder in library with CAML

I'm looking for a way to search for folder which name starts of 'Foo' using caml query in list. How can I narrow results to return only folders?
0
votes
3answers
2k views

Better way to get a SPListItem by Field

I want to get a SPListItem from a SPList where a field match a value. I have to ways to do it, CAML and LINQ. My code is: LINQ ... SPList list = Web.Lists["MyList"]; SPListItem item = (from ...
0
votes
1answer
147 views

CAML : Cannot complete this action

It seems my following query is failing and throwing "Cannot complete this action".However when I test this query in CAML Query builder it's working fine. <Where> <And> ...
1
vote
0answers
174 views

CAML Query on External Content Type not honoring the <In> operator

So I've been testing this out for a day or so. For the life of me I cannot get an external list to listen to honor the <In> operator in CAMLQuery. On any other type of list it seems to work ...
0
votes
2answers
1k views

Left Outer Join in SharePoint 2010

I have 2 lists in SharePoint 2010. First List E lists all locations. In the second list H I use first E list as lookup for Location. Every month users inputs information in list H. List E has ...
2
votes
0answers
544 views

IsNull not working in CAML query for indexed fields

So for example I have field 'TestField' which is indexed. How can I caml for items where 'TestField' value is null? My example down here will fail and won't find what I am querying for. <Where> ...
0
votes
3answers
1k views

Is it possible to have CAML Join without Lookup Columns?

I am new to SharePoint. I am developing a web-part in that I am trying to join two list. I have a same web-part in that lists were join using LINQ query. But it takes more time to fetch the data. So ...
2
votes
1answer
139 views

CAML Query where X =(A && B && C && D)

CAML makes me sad some days. Can someone point me in the right direction for the syntax in regards to a CAML query that would evaluate where X= A&B&C&D. My nesting is all off i'm assuming. ...
1
vote
1answer
193 views

CAML batch query - valid XML?

The standard format of a CAML batch query is as follows: <?xml version="1.0" encoding="UTF-8"?> <ows:Batch OnError="Continue"> <Method ID=""> ...
0
votes
0answers
128 views

CAML Designer: Could not load file or assembly 'Microsoft.Sharepoint

I am new to sharepoint, and this community. I have a CAML Designer program (http://karinebosch.wordpress.com/2012/05/12/caml-designer/) that I want to use to run queries on my Sharepoint Online lists. ...
2
votes
1answer
743 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?
3
votes
2answers
749 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
1answer
149 views

extend caml token ?

is there an hook or interface or whatever that could be used for extending token functionality of sharepoint? For example [Me] token is insufficient for me and I would like to for example develop my ...
2
votes
1answer
876 views

Search document from document library usin CAML query

I have document library which have folder and sub folder. the folder and sub folder level is more than 5. like as follow : Document Library |-> Folder-1 | -> Folder-1-1 | ...
0
votes
2answers
160 views

CAML Query Issue A or B and C

I'm trying to write a CAML query with the following parameters and I'm not having much luck. It should be simple enough but I can't figure it out. WHERE (X) EQUALS (A or B) And C I'm hoping someone ...
1
vote
1answer
195 views

CAML Query results every time 0 items

I try to filter items in the list by using caml. The List contains elements that matches the Filter. The code: enter code here SPQuery qry = new SPQuery(); qry.Query = @" ...
1
vote
2answers
587 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() { ...
3
votes
1answer
5k views

How to retrieve items from document libraries using client context without performance lag

I need to retrieve items/list items from SharePoint 2010 document library and display it in a list ListView using C#. I have used following CAML query to retrieve list items and its properties. ...