{"id":4492,"date":"2021-03-19T10:43:16","date_gmt":"2021-03-19T10:43:16","guid":{"rendered":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?post_type=epkb_post_type_1&#038;p=4492"},"modified":"2025-02-17T09:38:47","modified_gmt":"2025-02-17T09:38:47","slug":"routing-rule-expressions","status":"publish","type":"epkb_post_type_1","link":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/","title":{"rendered":"Routing rule expressions"},"content":{"rendered":"\n<p>You can find out more by watching <a href=\"https:\/\/www.youtube.com\/watch?v=Uz0b8cre2uQ\" target=\"_blank\" rel=\"noreferrer noopener\">this video<\/a> demonstrating how to add expressions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">If conditions for single and multiple response questions<\/h2>\n\n\n\n<p>The conditions used for routing must return true or false.<\/p>\n\n\n\n<p>These conditions are mainly for use in single or multiple response questions.  <\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong>Symbol<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Text<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Meaning<\/strong><\/th><th class=\"has-text-align-left\" data-align=\"left\"><strong>Example<\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\">=<\/td><td class=\"has-text-align-left\" data-align=\"left\">MT<\/td><td class=\"has-text-align-left\" data-align=\"left\">Value matches<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 = 3&nbsp;is true when code 3 is selected in response to Q1<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">==<\/td><td class=\"has-text-align-left\" data-align=\"left\">EQ<\/td><td class=\"has-text-align-left\" data-align=\"left\">Exact value match<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 == 3&nbsp;is true when code 3 is the only code chosen in response to Q1<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">&lt;&gt;<\/td><td class=\"has-text-align-left\" data-align=\"left\">NE<\/td><td class=\"has-text-align-left\" data-align=\"left\">Not an exact value match<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 &lt;&gt; 3&nbsp;is true if any other code than 3 has been selected in response to Q1 (even if code 3 has been selected as well)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">&lt;<\/td><td class=\"has-text-align-left\" data-align=\"left\">LT<\/td><td class=\"has-text-align-left\" data-align=\"left\">Less than<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 &lt; 5&nbsp;is true when the selected code has a value less than 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">&lt;=<\/td><td class=\"has-text-align-left\" data-align=\"left\">LE<\/td><td class=\"has-text-align-left\" data-align=\"left\">Less than or equal to<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 &lt;= 5&nbsp;is true if the code selected has a value of 5 or less than 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">&gt;<\/td><td class=\"has-text-align-left\" data-align=\"left\">GT<\/td><td class=\"has-text-align-left\" data-align=\"left\">Greater than<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 &lt; 5&nbsp;is true if the code selected has a value greater than 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">&gt;=<\/td><td class=\"has-text-align-left\" data-align=\"left\">GE<\/td><td class=\"has-text-align-left\" data-align=\"left\">Greater than or equal to<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 &gt;= 5&nbsp;is true if the code selected has a value of 5 or greater than 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">,<\/td><td class=\"has-text-align-left\" data-align=\"left\">OR<br>or<\/td><td class=\"has-text-align-left\" data-align=\"left\">Or<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 =(1, 3, 5)&nbsp;is true is Q1 has a value of 1,3 or 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">~<\/td><td class=\"has-text-align-left\" data-align=\"left\">TO<br>to<\/td><td class=\"has-text-align-left\" data-align=\"left\">Range, from first value to second value<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Q1 =(1~5)&nbsp;is true if Q1 has a value of 1, 2, 3, 4 or 5<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">#<\/td><td class=\"has-text-align-left\" data-align=\"left\">NUM num<\/td><td class=\"has-text-align-left\" data-align=\"left\">Number of responses<\/td><td class=\"has-text-align-left\" data-align=\"left\">If&nbsp;Num(Q1=2)&nbsp;is true if two answers have been ticked for Q1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">If conditions for any question<\/h2>\n\n\n\n<p>   These conditions are for use with any type of question. <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Q1 NA<\/td><td>This is true if Q1 is not asked<\/td><\/tr><tr><td>Q1 OK<\/td><td>This is true if a valid answer has been given to Q1<\/td><\/tr><tr><td>Q1 NR<\/td><td>This is true if an answer has not been recorded to Q1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Examples of If conditions<\/h2>\n\n\n\n<p>\n  These examples show possible conditions applied to single or multiple response questions\n<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>If Condition<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td>Q7=2<\/td><td>Code 2 is selected in Q7<\/td><\/tr><tr><td>Q3&gt;3<\/td><td>Any code above code 3 is selected in Q3<\/td><\/tr><tr><td>Q3&lt;3<\/td><td>Any code below code 3 is selected in Q3<\/td><\/tr><tr><td>Q3&gt;=3<\/td><td>Code 3 or above is selected in Q3<\/td><\/tr><tr><td>Q3&lt;=2<\/td><td>Code 2 or below is selected in Q3<\/td><\/tr><tr><td>Q7=(1,4) OR Q7=(1 or 4)<\/td><td>Code 1 or code 4 is selected in Q7<\/td><\/tr><tr><td>Q7=(3~5)<\/td><td>Code 3 or code 4 or code 5 in selected in Q7<\/td><\/tr><tr><td>Q7==2<\/td><td>Only code 2 is selected in Q7 (Q7 is a multiple response)<\/td><\/tr><tr><td>(Q2=2 OR Q4=1)<\/td><td>EITHER code 2 is selected in Q2 or code 1 is selected in Q4<\/td><\/tr><tr><td>(Q2=2 AND Q4=1)<\/td><td>BOTH code 2 of Q2 is selected AND code 1 of Q4 is selected<\/td><\/tr><tr><td>(Q2=2 AND Q4=1)<\/td><td>BOTH code 2 of Q2 is selected AND code 1 of Q4 is selected<\/td><\/tr><tr><td>(Q2=2 OR Q4=1) AND Q5&gt;=10)<\/td><td>EITHER code 2 of Q2 is selected or code 1 of Q4 is selected, and also gave an answer of 10 or above to Q5<\/td><\/tr><tr><td>NUM Q2=2<\/td><td>Two answers have been selected at Q2 (Q2 would be a multi response question)<\/td><\/tr><tr><td>UNLESS (Q2=2)<\/td><td>Code 2 is NOT selected in Q2<\/td><\/tr><tr><td>NOT(Q1=4)<\/td><td>Code 4 is NOT selected in Q1<\/td><\/tr><tr><td>UNLESS (Q2=2)OR NOT(Q1=4)<\/td><td>Either code 2 is NOT selected in Q2 or code 4 is NOT selected in Q1<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>You can find out more by watching this video demonstrating how to add expressions. If conditions for single and multiple response questions The conditions used for routing must return true or false. These conditions are mainly for use in single or multiple response questions. Symbol Text Meaning Example = MT Value matches If&nbsp;Q1 = 3&nbsp;is [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"epkb_post_type_1_category":[39,32],"epkb_post_type_1_tag":[],"class_list":["post-4492","epkb_post_type_1","type-epkb_post_type_1","status-publish","hentry","epkb_post_type_1_category-add-survey-logic","epkb_post_type_1_category-build-your-survey"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Routing rule expressions | SnapSurveys<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Routing rule expressions | SnapSurveys\" \/>\n<meta property=\"og:description\" content=\"You can find out more by watching this video demonstrating how to add expressions. If conditions for single and multiple response questions The conditions used for routing must return true or false. These conditions are mainly for use in single or multiple response questions. Symbol Text Meaning Example = MT Value matches If&nbsp;Q1 = 3&nbsp;is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/\" \/>\n<meta property=\"og:site_name\" content=\"SnapSurveys\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/snapsurveys\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-17T09:38:47+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@snapsurveys\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/\",\"name\":\"Routing rule expressions | SnapSurveys\",\"isPartOf\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\"},\"datePublished\":\"2021-03-19T10:43:16+00:00\",\"dateModified\":\"2025-02-17T09:38:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Snap XMP Support\",\"item\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Routing rule expressions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"name\":\"Snap XMP Support Hub\",\"description\":\"Support documentation for Snap Surveys products\",\"publisher\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization\",\"name\":\"Snap Surveys\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"contentUrl\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg\",\"width\":867,\"height\":159,\"caption\":\"Snap Surveys\"},\"image\":{\"@id\":\"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/snapsurveys\",\"https:\/\/x.com\/snapsurveys\",\"https:\/\/www.linkedin.com\/company\/snapsurveys\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Routing rule expressions | SnapSurveys","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":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/","og_locale":"en_GB","og_type":"article","og_title":"Routing rule expressions | SnapSurveys","og_description":"You can find out more by watching this video demonstrating how to add expressions. If conditions for single and multiple response questions The conditions used for routing must return true or false. These conditions are mainly for use in single or multiple response questions. Symbol Text Meaning Example = MT Value matches If&nbsp;Q1 = 3&nbsp;is [&hellip;]","og_url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/","og_site_name":"SnapSurveys","article_publisher":"https:\/\/www.facebook.com\/snapsurveys","article_modified_time":"2025-02-17T09:38:47+00:00","twitter_card":"summary_large_image","twitter_site":"@snapsurveys","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/","name":"Routing rule expressions | SnapSurveys","isPartOf":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website"},"datePublished":"2021-03-19T10:43:16+00:00","dateModified":"2025-02-17T09:38:47+00:00","breadcrumb":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp\/routing-rule-expressions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/"},{"@type":"ListItem","position":2,"name":"Snap XMP Support","item":"https:\/\/www.snapsurveys.com\/support-snapxmp\/snapxmp-archive\/"},{"@type":"ListItem","position":3,"name":"Routing rule expressions"}]},{"@type":"WebSite","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#website","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","name":"Snap XMP Support Hub","description":"Support documentation for Snap Surveys products","publisher":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.snapsurveys.com\/support-snapxmp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#organization","name":"Snap Surveys","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/","url":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","contentUrl":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-content\/uploads\/2020\/06\/snap-surveys-logo-fc.svg","width":867,"height":159,"caption":"Snap Surveys"},"image":{"@id":"https:\/\/www.snapsurveys.com\/support-snapxmp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/snapsurveys","https:\/\/x.com\/snapsurveys","https:\/\/www.linkedin.com\/company\/snapsurveys"]}]}},"_links":{"self":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/4492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1"}],"about":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/types\/epkb_post_type_1"}],"author":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/comments?post=4492"}],"version-history":[{"count":16,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/4492\/revisions"}],"predecessor-version":[{"id":13318,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1\/4492\/revisions\/13318"}],"wp:attachment":[{"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/media?parent=4492"}],"wp:term":[{"taxonomy":"epkb_post_type_1_category","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_category?post=4492"},{"taxonomy":"epkb_post_type_1_tag","embeddable":true,"href":"https:\/\/www.snapsurveys.com\/support-snapxmp\/wp-json\/wp\/v2\/epkb_post_type_1_tag?post=4492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}