Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

CAML

<Query>
  <Where>
    <Contains>
      <FieldRef Name="URL" />
      <Value Type="URL">text</Value>
    </Contains>
  </Where>
</Query>

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

1 Answer 1

up vote 4 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

 
discard

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.