DAV: How To Search mv.string Properties

The following SEARCH will return items which have been associated with the “Business” category but NOT the “Competition” category in Outlook.



<?xml version='1.0'?>

<D:searchrequest xmlns:D='DAV:'>


   SELECT "DAV:href", "urn:schemas-microsoft-com:office:office#Keywords"


         "http://mstehleEx03/exchange/mrmet/Calendar/"' )


       "DAV:isfolder"= false


       "DAV:ishidden" = false


       "urn:schemas-microsoft-com:office:office#Keywords" != CAST("Competition" AS 'mv.string')


       "urn:schemas-microsoft-com:office:office#Keywords" = CAST("Business" AS 'mv.string')





...We don’t seem to have any samples out there that demonstrate how to use a multivalued property in a WHERE clause.  I took me a bit to figure this out because the behavior is kind of funny…


Notice that even though we are specifying “=” it behaves similar to a LIKE or CONTAINS query…


Suppose you have two items in a folder Item A with the “Business” category and Item B with “Business” and “Competition”.  If this query just had the clause for “Business” then both items would be returned.  However, if you use specify that the Keywords must equal “Business” and not equal “Competition” then you only get Item A.

Comments (2)
  1. WebDAV Samples Index


    Listed below are links to my WebDAV samples.&amp;nbsp; If you have questions…

  2. …I have posted a new WebDAV sample for using&amp;nbsp;mv.string properties like Keywords and RRule in WHERE…

Comments are closed.

Skip to main content