As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [caml]

Collaborative Application Markup Language (CAML) is an XML-based language that is used in Microsoft SharePoint Foundation to define the fields and views that are used in sites and lists.

Filter by
Sorted by
Tagged with
-1 votes
2 answers
3k views

How to change a date format in CAML

I got a wrong date format to a CAML. I have got (yyyy-mm-dd) and must to be understand by CAML to the format(dd-mm-yyyy), how can I do this. I tried by String.Format("{0:yyyy-mm-dd}", dateISO1);, but ...
Grzegorz Z's user avatar
  • 1,709
0 votes
1 answer
227 views

How to add id CAML grouping?

I write this code, and I try to group by Ascending or Descending. <Query> <Where> <Neq> <FieldRef Name='Nazwisko' /> <Value Type='Note'>" "<...
Grzegorz Z's user avatar
  • 1,709
1 vote
2 answers
4k views

CAML query not filtering results

Can someone tell me why the following CAML query is not filtering results? It's returning files that do not contain "/Internal/Bug 594" in their FileRef value. Thanks. <View Scope='Recursive'>...
Victor's user avatar
  • 11
1 vote
2 answers
2k views

CrossListQueryInfo\SPSiteDataQuery how to skip items with specific WebId?

Customer wants to see 10 news items from all webs on front page. Also customer wants to specify some news that we should skip. I am trying to do next thing: var id =1; <Neq><FieldRef ...
Ievgen's user avatar
  • 360
0 votes
1 answer
2k views

How to check DateTime condition in CAML Query?

I want to fetch the records from List which are created in Last 5 minutes. I have written following code, but its not working. giving me error. <Geq><FieldRef Name='CreatedDate' /> ...
Shahid's user avatar
  • 229
5 votes
2 answers
16k views

Error in CAML Query with multiple "AND"

When I run the following query I get an error: <Where> <And> <Eq> <FieldRef Name="IssueLOB" LookupId="TRUE" /> <Value Type="Lookup">1</...
E7AD's user avatar
  • 107
2 votes
1 answer
587 views

Add content type from sandboxed solution to list definition (farm solution) does not work

I'm using a sandboxed solution from a 3rd party vendor which contains some site columns and a site content type. I want to add this content type to my document library definition in CAML. But when I ...
Jeroen Van Malderen's user avatar
0 votes
1 answer
1k views

Caml Join Field Type

I'm having trouble using the Join via Caml. In a way, I'm having trouble working with 1 field, that is "new window" that the field type is boolean. My code looks like this: SPQuery oQuery = new ...
Tiago's user avatar
  • 97
0 votes
2 answers
145 views

SP2010 and Report Builder

I have an SSRS report integrated with SP 2010, the data in the report is loaded from a SP list. The current issue that I am facing is not being able to read minimum and maximum date time field for the ...
Aman's user avatar
  • 1
1 vote
2 answers
981 views

CAML Query List by months

I was wondering if i have 3 random dates. 11/12/2012 9/24/2011 12/29/2008, I'd like to have September 9/24/2011 November 11/12/2012 December 12/29/2008 instead of using the query to sort by ...
will's user avatar
  • 329
1 vote
1 answer
519 views

Using the value from a lookup column, obtained with REST, as a dataview parameter

I was wondering if you could help me with something. I have a list called Site Configuration. One of the columns is called Package Level (Package_x0020_Level) and is a lookup that looks at the ...
Cliff Shamone's user avatar
2 votes
2 answers
514 views

CAML Query behaving differently in CAML Builder and Code

Based on feedback from my earlier question, I have constructed a query using the excellent CAML Builder tool: <Where> <Or> <Membership Type='CurrentUserGroups'> <FieldRef ...
Philipp Schmid's user avatar
0 votes
2 answers
4k views

ProcessBatchData CAML Mass Delete SPListItems

Attempting to bulk delete List Item using ProcessBatchData in a PowerShell script. Here is a command that my code is generating but I am getting an error when it executes. I have been unable to find ...
ChiliYago's user avatar
  • 2,166
1 vote
1 answer
1k views

Caml for "multi lookup has no values" condition

I need to get items from my list where multiLookup field contains value (for example, value is 42) or has no values. First part is simple: <Eq> <FieldRef Name='mlookup' LookupId='true' /&...
Denis Zavershinskiy's user avatar
5 votes
4 answers
13k views

Multiple Values in CAML query from Array? SharePoint 2010 using jQuery/SPServices

So if I use SPServices to GetListItems with CAMLQuery, is it possible to insert multiple values inside Value Type='Number'> here I would like to evaluate things throught a flow in my page, add to an ...
Justin's user avatar
  • 1,361
1 vote
2 answers
2k views

Defining Lookup Fields in CAML that pulls multiple fields

We have defined a number of lookup fields like so: <Field ID="{81A578F2-8022-4083-8683-7F9BF039C82A}" Name="NameLookup" DisplayName="Navn" ...
Jens's user avatar
  • 141
2 votes
3 answers
2k views

How to query an existing view in Sharepoint 2010

I want to query and existing sharepoint view. Is this possible? I did not find any tutorial to guide for querying a view.How cant it be done? Kindly tell me is this possible or not and if yes than how?...
Ishan's user avatar
  • 774
0 votes
1 answer
283 views

Query by user field returns wrong number of items

I'm trying to query a list in an eventreceiver through properties.List.GetItems (in the itemadding event). The field I'm filtering on is a 'Person or Group' field. But the query always returns all ...
user7531's user avatar
1 vote
1 answer
2k views

How do I convert CAML to use in the CQWP?

I have the following CAML query which returns checked out files. <Query><Where><Eq><FieldRef Name="CheckoutUser" /><Value Type="User">[Me]</Value></Eq></...
Justin's user avatar
  • 11
1 vote
1 answer
300 views

grabbing a column from a list

I'm having an issue when I'm trying to grab a column I made in the tasks list (it's a lookup column). for some reason when i'm try to access it with javascript i always get an exception that it isn't ...
user10319's user avatar
8 votes
4 answers
10k views

CAML vs LINQ vs SQL

So LINQ is a front end to CAML so of course CAML is faster, and CAML is a front end to SQL so of course SQL is faster. However what would be a good test to see where and when to use each of these on ...
Hugh Wood's user avatar
  • 6,275
2 votes
3 answers
3k views

Query for retrieving managed metadata column where the column values are a subset of a list of values

In CAML, if I have a managed metadata column with multiple values, you can determine if one of a list of values is in the column using the following query (where the order of the Values/FieldRef ...
lgaud's user avatar
  • 1,951
5 votes
1 answer
1k views

SP2010: Strange behavior querying on taxonomy field

I need to query a document library to get items associated with some taxonomy terms, or items with specific documentId (site collection scoped feature, not the integer ID of the item), but the whole ...
sle1306's user avatar
  • 67
0 votes
1 answer
1k views

how to query greatest ID of each value in a Sharepoint list?

I have a list with two columns (ID,Value). I want grouped list with value columns then select greatest Id of it. ID | Value 1 | 101 2 | 305 3 | 102 4 | 101 5 | 305 6 | 101 Result : ID |...
ar.gorgin's user avatar
  • 1,228
0 votes
2 answers
1k views

DVWP CrossList Paging Does Not Work

I've build a Data View Web Part with SharePoint Designer 2010, using SPDataSource and DataSourceMode="CrossList". The DVWP works great, but when I add paging, it adds the paging placeholder and the ...
Dolev's user avatar
  • 23
0 votes
1 answer
2k views

SQL Not IN equivalent in CAML

I have two list(subject, subjectcategory). subject(ID,Title,CategoryId) subjectcategory(ID,Title) I want to create a CAML query for SharePoint that does something like this SELECT ID, Title ...
ar.gorgin's user avatar
  • 1,228
1 vote
0 answers
82 views

Calendar repeating alert

I have a sharepoint calendar which I would like to send out alerts for recurring appointments. All the appointments are on a monthly basis, e.g. every 3rd of the month. I have a reminder web part ...
Nick Mumby's user avatar
2 votes
2 answers
1k views

How to Add a ListItem?

I am able to add an item to a list using the CAML below. Now I need to modify it to make sure I can add an attachment as well. What is the syntax to add an attachment? <?xml version="1.0" encoding=...
Robin Li's user avatar
  • 159
9 votes
2 answers
3k views

When using Sharepoint Client Model I get error : The 'Contains' member cannot be used in the expression

When using 'Contains' in Linq query: var camlQuery = new CamlQuery(); var listItems = list.GetItems(camlQuery); var itemQuery = listItems.Where(i => i.FieldValuesAsText["Title"].Contains("van"))....
Stef Heyenrath's user avatar
1 vote
3 answers
5k views

how to check CamlQuery results

.I am running below query against a sharepoint list. How to check the results of below Camlquery? cPop is set with value 'AboutUs'. Result is always zero records although list has valid matching ...
NewCoder's user avatar
0 votes
1 answer
374 views

SP2007 - How to display textbox field element based on dropdown menu choice on Edit Column page?

I'm creating a custom list field type which is basically a glorified multichoice field, but I want the checkboxes to be grouped by headings that the user can specify. For example: Status1 ...
MattL922's user avatar
  • 123
1 vote
0 answers
140 views

Sharepoint - caml join with numbers

I have done a join in Caml with my list (example list A) to another list (example list B) One of the fields in list B is a number of 2 decimal places. However, in the view it is displaying lots of ...
Joseph Caruana's user avatar
0 votes
2 answers
428 views

Provision a ListView to a already existing list

How do you with CAML provision a View to a already existing list? I know how to add views through list definitions.
Tim's user avatar
  • 801
1 vote
2 answers
198 views

Provision a file through a module (CAML) and choose its Content Type

How do you provision a file through a module (CAML) and choose its Content Type? Is it even possible? The normal behavior for a new item is to get the default content type.
Tim's user avatar
  • 801
2 votes
1 answer
4k views

CAML Query to pull list items only if their approved?

Although the solution seems relatively strightforward it doesnt seem to work. Here is my CAML query to pull all items from a list that have been approved through the OOTB Sharepoint Approval ...
user7400's user avatar
  • 1,256
2 votes
2 answers
2k views

CAML query to retrieve the second set of three list items from the announcements list?

The CAML query to pull say 3 items based off of the following requirements seems pretty starightforward: Title is not null Expires(Expiry Date) is greater than or equal to Today Order Created in ...
user7400's user avatar
  • 1,256
2 votes
5 answers
13k views

CAML Query Filtering with OffsetDays

I'd like to set up a CAML query in a Data View Web Part (DVWP) that works like this: If a date is not specified on the Query String, then show me items created in the last 30 days If a date is ...
Marc D Anderson's user avatar
1 vote
1 answer
1k views

Declarative (CAML) BusinessData field

I am trying to create a List template definition declaratively (using CAML) which includes a External Data column and several secondary columns. I created a custom list via the UI and exported the ...
Rex M's user avatar
  • 311
0 votes
0 answers
105 views

CAML : How to Join Two List in CAML Query? [duplicate]

Possible Duplicate: How can I Create a join between two sharepoint custom list using CAML Query? I have been asked this question in interviews a lot and I am still trying to figure out what ...
NICK's user avatar
  • 131
12 votes
2 answers
41k views

Querying a simple list with a 'User' column, using CAML

I'm having some trouble getting a CAML Query working against a very simple list. My custom list has the fields: Person : User Date : Date Amount : Lookup My query looks like this: <Query> &...
user avatar
1 vote
2 answers
1k views

CAML query returning everything?

I am busy messing around with lists and CAML queries: SPQuery query = new SPQuery(); SPList list; SPListItemCollection collection; query = new SPQuery(); query.Query = "<Query><Where><...
Sebastien Stettler's user avatar
0 votes
1 answer
2k views

Join two list using multivalued lookup field with spquery

I have joined two lists with the lookup that allow single value using spquery.join. can any one help me to do for multivalue lookup
yogesh's user avatar
  • 183

1
7 8 9 10
11