Search code examples
sharepointmosswindows-sharepoint-services

how to achieve "contains" for numeric field using caml in sharepoint


I want to achieve a wildcard search in CAML Query. I used the "Contains" clause to achieve this functionality for text field. I want to achieve the same functionality for a numeric field. Contains does not work for it. Can someone tell me how to achieve this functionality for a numeric field. Is there any operator such as "like" in SQL???


Solution

  • CAML only allows contains to be used on Text or Note type fields. But you could set up a new calculated list column (type text) who's value is the same as the number.

    Then, use your CAML query on the "text" field that Contains the numerical string.

    ~ED