SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list with an URL-field. Nothing special, just the OOTB Hyperlink-field.

I want to execute a CAML-query that selects items with a certain value in the description part of the URL-field.


      <FieldRef Name="URL" />
      <Value Type="URL">text</Value>

Result Only items with 'text' in de url part are selected, if a item has 'text' in the description part it is not selected.

How do i select items based the description of the URL?

share|improve this question
up vote 7 down vote accepted

I'm pretty sure you won't be able to do this with a CAML query. This is because for 'complex' fields which store multiple values, only the 'default' value is available to query - by this I mean what would be available when SPField.GetFieldValueAsText() is called.

This would mean the only way to 'query' like this is to iterate through the items in the list.

share|improve this answer
Thanks, for now i just added an extra column which duplicates the value of the description and use that for filtering. – Dribbel Feb 21 '10 at 11:24
If this is the solution. It will take more time to show the Results.. – user9008 Jun 21 '12 at 13:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.