{"id":1125,"date":"2023-04-07T14:45:12","date_gmt":"2023-04-07T11:45:12","guid":{"rendered":"https:\/\/docs.unibell.ru\/?page_id=1125"},"modified":"2025-02-07T09:32:43","modified_gmt":"2025-02-07T06:32:43","slug":"%d1%81%d1%80%d0%b0%d0%b2%d0%bd%d0%b5%d0%bd%d0%b8%d0%b5-%d0%bf%d0%b5%d1%80%d0%b5%d0%bc%d0%b5%d0%bd%d0%bd%d0%be%d0%b9","status":"publish","type":"page","link":"https:\/\/docs.cpaas.mittoapi.net\/?page_id=1125","title":{"rendered":"Var comparison"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison0.png\"><img decoding=\"async\" width=\"108\" height=\"83\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison0.png\" alt=\"\" class=\"wp-image-4026\"\/><\/a><\/figure>\n\n\n\n<p>The &#8220;Var comparison&#8221; block is used for comparing the value of a specified variable with any other given value, or with the value of another variable, with the option to specify a nested object (for more details on the nested object, see <a href=\"https:\/\/docs.cpaas.mittoapi.net\/?page_id=837\">Variable<\/a>).<\/p>\n\n\n\n<p>The outputs of the block are the results of the comparison in the form of &#8220;True&#8221; or &#8220;False&#8221; values. In practical terms, this means that if the condition specified in the block settings is true, the further flow of the scenario follows the &#8220;True&#8221; branch, and if not, it follows the &#8220;False&#8221; branch.<\/p>\n\n\n\n<p>If both operands are numbers, they are compared according to the rules for comparing numbers; otherwise, they are compared according to the rules for comparing strings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2025\/02\/var_comparison.png\"><img decoding=\"async\" width=\"270\" height=\"322\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2025\/02\/var_comparison.png\" alt=\"\" class=\"wp-image-4169\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2025\/02\/var_comparison.png 270w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2025\/02\/var_comparison-252x300.png 252w\" sizes=\"(max-width: 270px) 100vw, 270px\" \/><\/a><\/figure>\n\n\n\n<p>Features of the block are:<\/p>\n\n\n\n<p>1. Choice of comparison operation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison1.png\"><img decoding=\"async\" width=\"262\" height=\"300\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison1.png\" alt=\"\" class=\"wp-image-4028\"\/><\/a><\/figure>\n\n\n\n<p>2. Choice of a variable that will have its value compared:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison2.png\"><img decoding=\"async\" width=\"257\" height=\"297\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison2.png\" alt=\"\" class=\"wp-image-4029\"\/><\/a><\/figure>\n\n\n\n<p>3. Choice of what a variable\u2019s value will be compared with. For the option \u2018Compare with a value\u2019 in the \u2018Compared value\u2019 field enter a value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison3.png\"><img decoding=\"async\" width=\"259\" height=\"309\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison3.png\" alt=\"\" class=\"wp-image-4030\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison3.png 259w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison3-251x300.png 251w\" sizes=\"(max-width: 259px) 100vw, 259px\" \/><\/a><\/figure>\n\n\n\n<p>If a variable has to be compared with another variable you can go to the \u2018Variable\u2019 block and choose the needed variable. If data structure is to be assigned to this variable then you can specify in the \u2018Nested object\u2019 field which object from this data structure has to be compared.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison4.png\"><img decoding=\"async\" width=\"265\" height=\"376\" src=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison4.png\" alt=\"\" class=\"wp-image-4031\" srcset=\"https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison4.png 265w, https:\/\/docs.cpaas.mittoapi.net\/wp-content\/uploads\/2024\/12\/variable_comparison4-211x300.png 211w\" sizes=\"(max-width: 265px) 100vw, 265px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The &#8220;Var comparison&#8221; block is used for comparing the value of a specified variable with any other given value, or with the value of another variable, with the option to specify a nested object (for more details on the nested object, see Variable). The outputs of the block are the results of the comparison in <a href=\"https:\/\/docs.cpaas.mittoapi.net\/?page_id=1125\" class=\"more-link\">&#8230;<span class=\"screen-reader-text\">  Var comparison<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":862,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"tpl\/scenario-personal.php","meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/1125"}],"collection":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1125"}],"version-history":[{"count":21,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/1125\/revisions"}],"predecessor-version":[{"id":4170,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/1125\/revisions\/4170"}],"up":[{"embeddable":true,"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=\/wp\/v2\/pages\/862"}],"wp:attachment":[{"href":"https:\/\/docs.cpaas.mittoapi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}