{"id":409,"date":"2008-11-20T19:32:00","date_gmt":"2008-11-20T19:32:00","guid":{"rendered":"https:\/\/brainlitter.itgroove.net\/2008\/11\/20\/care-with-caml-query-logical-joins\/"},"modified":"2008-11-20T19:32:00","modified_gmt":"2008-11-20T19:32:00","slug":"care-with-caml-query-logical-joins","status":"publish","type":"post","link":"https:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/","title":{"rendered":"Care with CAML query logical joins"},"content":{"rendered":"<div class=\"ExternalClassB41019BB02134078BF45DF52DC4516BE\">\n<p>CAML (Collaborative Application Markup Language) is the markup used to specify search queries using the <font face=\"Courier\">SPQuery<\/font> class. The schema can be found <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms467521.aspx\">here.<\/a> Another useful link is the value types allowed in the <font face=\"Courier New\"><\/font> tag, <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/microsoft.sharepoint.spfieldtype.aspx\">here<\/a>.<\/p>\n<p>One might infer that <font face=\"Courier New\"><\/font> and <font face=\"Courier New\"><\/font> tags can contain any number of comparison operator tags, but this is incorrect. Each logical join must have exactly two tags inside, and they can be either comparison operators or nested logical joins. Thus, to produce logical joins with three or more clauses, you must do something like this: <\/p>\n<p><font face=\"Courier New\">&lt;<\/font>[clause-1]<font face=\"Courier New\">\/&gt;&lt;<\/font>[clause-2]<font face=\"Courier New\">\/&gt;&lt;<\/font>[clause-3]<font face=\"Courier New\">\/&gt;<\/font><\/p>\n<p><\/p>\n<p>The error that occurs when an arbitrary number of tags are nested is:<\/p>\n<p><i>One or more field types are not installed properly. Go to the list settings page to delete these fields.<\/i><\/p>\n<p><\/p>\n<p>This error is not descriptive of this problem. It is more typically describing a problem where a field\u2019s \u2018friendly\u2019 name (as seen in the web UI) has been specified in the <font face=\"Courier New\">FieldRef<\/font> tag instead of its internal name.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>CAML (Collaborative Application Markup Language) is the markup used to specify search queries using the SPQuery class. The schema can be found here. Another useful link is the value types allowed in the tag, here. One might infer that and tags can contain any number of comparison operator tags, but this is incorrect. Each logical &hellip; <a href=\"https:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\"><\/a><\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[14],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"og:description\" content=\"CAML (Collaborative Application Markup Language) is the markup used to specify search queries using the SPQuery class. The schema can be found here. Another useful link is the value types allowed in the tag, here. One might infer that and tags can contain any number of comparison operator tags, but this is incorrect. Each logical &hellip;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\" \/>\n<meta property=\"og:site_name\" content=\"Brainlitter - Inside the mind of Sean Wallbridge\" \/>\n<meta property=\"article:published_time\" content=\"2008-11-20T19:32:00+00:00\" \/>\n<meta name=\"author\" content=\"Sean Wallbridge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sean Wallbridge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\",\"url\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\",\"name\":\"Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\"},\"datePublished\":\"2008-11-20T19:32:00+00:00\",\"dateModified\":\"2008-11-20T19:32:00+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\"},\"breadcrumb\":{\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Brainlitter\",\"item\":\"https:\/\/regroove.ca\/brainlitter\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Care with CAML query logical joins\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#website\",\"url\":\"https:\/\/regroove.ca\/brainlitter\/\",\"name\":\"Brainlitter - Inside the mind of Sean Wallbridge\",\"description\":\"Dad. Husband. Drummer. Learner of Things.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77\",\"name\":\"Sean Wallbridge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g\",\"caption\":\"Sean Wallbridge\"},\"url\":\"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/","og_locale":"en_US","og_type":"article","og_title":"Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge","og_description":"CAML (Collaborative Application Markup Language) is the markup used to specify search queries using the SPQuery class. The schema can be found here. Another useful link is the value types allowed in the tag, here. One might infer that and tags can contain any number of comparison operator tags, but this is incorrect. Each logical &hellip;","og_url":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/","og_site_name":"Brainlitter - Inside the mind of Sean Wallbridge","article_published_time":"2008-11-20T19:32:00+00:00","author":"Sean Wallbridge","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sean Wallbridge","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/","url":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/","name":"Care with CAML query logical joins - Brainlitter - Inside the mind of Sean Wallbridge","isPartOf":{"@id":"https:\/\/regroove.ca\/brainlitter\/#website"},"datePublished":"2008-11-20T19:32:00+00:00","dateModified":"2008-11-20T19:32:00+00:00","author":{"@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77"},"breadcrumb":{"@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/regroove.ca\/brainlitter\/2008\/11\/20\/care-with-caml-query-logical-joins\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Brainlitter","item":"https:\/\/regroove.ca\/brainlitter\/"},{"@type":"ListItem","position":2,"name":"Care with CAML query logical joins"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/brainlitter\/#website","url":"https:\/\/regroove.ca\/brainlitter\/","name":"Brainlitter - Inside the mind of Sean Wallbridge","description":"Dad. Husband. Drummer. Learner of Things.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/brainlitter\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/74e1c0def190f181c1394c2b6d883e77","name":"Sean Wallbridge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/brainlitter\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/adf8cea6291c39d166616f2148d919a6?s=96&d=mm&r=g","caption":"Sean Wallbridge"},"url":"https:\/\/regroove.ca\/brainlitter\/author\/swallbridge\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/409"}],"collection":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":0,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/brainlitter\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}