I have to pull the data from the custom list by using a CAML query.
I would like to use the "Endswith" option in the CAML query however it seems to be unsupported in sharepoint 2007.
What would be the alternative?

Search on Internet
Internet Search
Basic Internet lessons
Urbanization and Internetization

I want to fetch all the items which has a keyword of Internet (except the last one) but not Internetization. Is there any other way to achieve the same without using "Endswith".


Yes, it's a shame that sharepoint don't have EndsWith. As for answer you can develop a custom web part:

  • Use CAML query to reatrive all that contain 'Internet' via <Contains>
  • Results that were provided will only contain those that have 'Intranet' and you can iterate over each item and check if it ends with Internet String.EndsWith .

The worst case if all words contain Internet then implement paging and get them from list in packs that wont create much impact.

  • 1
    It's a pity to iterate through all the results, not only you will be waiting for the query to execute, you will also lose time iterating through all the results, what if the query returns tons of rows? – Zee99 Jun 16 '11 at 14:27
  • Yeah I have a library with 6000 records, yuk. – Russell Jul 5 '11 at 4:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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