{"id":2869,"date":"2026-10-10T12:14:52","date_gmt":"2026-10-10T09:14:52","guid":{"rendered":"https:\/\/www.about1c.ru\/v83\/?p=2869"},"modified":"2026-10-29T22:05:06","modified_gmt":"2026-10-29T19:05:06","slug":"how-get-ref-element-by-query","status":"publish","type":"post","link":"https:\/\/www.about1c.ru\/v83\/language-reference\/queries\/query-examples\/how-get-ref-element-by-query","title":{"rendered":"\u041a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 1\u0421 8?"},"content":{"rendered":"<p style=\"text-align: justify;\">\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0434 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0434\u044b) \u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435). \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<!--more--><\/p>\n<pre class=\"code\">\u0417\u0430\u043f\u0440\u043e\u0441 <span style=\"color: red;\">=<\/span> <span style=\"color: red;\">\u041d\u043e\u0432\u044b\u0439<\/span> \u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">;<\/span>\r\n\u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">.<\/span>\u0422\u0435\u043a\u0441\u0442 <span style=\"color: red;\">=<\/span> <span style=\"color: black;\">\"\u0412\u042b\u0411\u0420\u0410\u0422\u042c \u0421\u0441\u044b\u043b\u043a\u0430, \u041a\u043e\u0434, \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <\/span>\r\n<span style=\"color: black;\">|\u0418\u0417 \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a.\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435\u041b\u0438\u0446\u0430<\/span>\r\n<span style=\"color: black;\">|\u0413\u0414\u0415 \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 = &amp;\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\";<\/span>\r\n\u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">.<\/span>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<span style=\"color: red;\">(<\/span><span style=\"color: black;\">\"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\"<\/span><span style=\"color: red;\">,<\/span> <span style=\"color: black;\">\"\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447\"<\/span><span style=\"color: red;\">)<\/span><span style=\"color: red;\">;<\/span>\r\n<\/pre>\n<div class=\"attention\"><strong>\u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443<\/strong> \u0415\u0441\u043b\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u043a\u043e\u0434 \u0438\u043b\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430, \u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0440\u043e\u0449\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430: \u041d\u0430\u0439\u0442\u0438\u041f\u043e\u041a\u043e\u0434\u0443(\u041a\u043e\u0434) \u0438\u043b\u0438 \u041d\u0430\u0439\u0442\u0438\u041f\u043e\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044e(\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435).<\/div>\n<p style=\"text-align: justify;\">\u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>\u041f\u041e\u0414\u041e\u0411\u041d\u041e<\/code>:<\/p>\n<pre class=\"code\">\u0417\u0430\u043f\u0440\u043e\u0441 <span style=\"color: red;\">=<\/span> <span style=\"color: red;\">\u041d\u043e\u0432\u044b\u0439<\/span> \u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">;<\/span>\r\n\u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">.<\/span>\u0422\u0435\u043a\u0441\u0442 <span style=\"color: red;\">=<\/span> <span style=\"color: black;\">\"\u0412\u042b\u0411\u0420\u0410\u0422\u042c \u0421\u0441\u044b\u043b\u043a\u0430, \u041a\u043e\u0434, \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 <\/span>\r\n<span style=\"color: black;\">|\u0418\u0417 \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a.\u0424\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0435\u041b\u0438\u0446\u0430<\/span>\r\n<span style=\"color: black;\">|\u0413\u0414\u0415 \u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u041f\u041e\u0414\u041e\u0411\u041d\u041e &amp;\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\";<\/span>\r\n\u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">.<\/span>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<span style=\"color: red;\">(<\/span><span style=\"color: black;\">\"\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\"<\/span><span style=\"color: red;\">,<\/span> <span style=\"color: black;\">\"\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d%\"<\/span><span style=\"color: red;\">)<\/span><span style=\"color: red;\">;<\/span>\r\n<\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0439\u0434\u0435\u0442 \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0438\u0434\u0430:<\/p>\n<ul>\n<li>\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d<\/li>\n<li>\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0418\u0432\u0430\u043d\u043e\u0432\u0438\u0447<\/li>\n<li>\u0418\u0432\u0430\u043d\u043e\u0432 \u0418\u0432\u0430\u043d \u0421\u0435\u0440\u0433\u0435\u0435\u0432\u0438\u0447<\/li>\n<li>\u0438 \u0442.\u043f.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0433\u043e\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e <a href=\"https:\/\/www.about1c.ru\/v83\/language-reference\/queries\/query\/method-execute\">\u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441<\/a> (\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445) \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0445 :<\/p>\n<pre class=\"code\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 <span style=\"color: red;\">=<\/span> \u0417\u0430\u043f\u0440\u043e\u0441<span style=\"color: red;\">.<\/span>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c<span style=\"color: red;\">()<\/span><span style=\"color: red;\">;<\/span>\r\n<span style=\"color: red;\">\u0415\u0441\u043b\u0438<\/span> <span style=\"color: red;\">\u041d\u0415<\/span> \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<span style=\"color: red;\">.<\/span>\u041f\u0443\u0441\u0442\u043e\u0439<span style=\"color: red;\">()<\/span> <span style=\"color: red;\">\u0422\u043e\u0433\u0434\u0430<\/span>\r\n    \u0412\u044b\u0431\u043e\u0440\u043a\u0430 <span style=\"color: red;\">=<\/span> \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<span style=\"color: red;\">.<\/span>\u0412\u044b\u0431\u0440\u0430\u0442\u044c<span style=\"color: red;\">()<\/span><span style=\"color: red;\">;<\/span>\r\n    <span style=\"color: red;\">\u041f\u043e\u043a\u0430<\/span> \u0412\u044b\u0431\u043e\u0440\u043a\u0430<span style=\"color: red;\">.<\/span>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439<span style=\"color: red;\">()<\/span> <span style=\"color: red;\">\u0426\u0438\u043a\u043b<\/span>\r\n        \u0421\u043e\u043e\u0431\u0449\u0438\u0442\u044c<span style=\"color: red;\">(<\/span>\u0421\u0442\u0440\u0428\u0430\u0431\u043b\u043e\u043d<span style=\"color: red;\">(<\/span><span style=\"color: black;\">\"%1, %2\"<\/span><span style=\"color: red;\">,<\/span> \u0412\u044b\u0431\u043e\u0440\u043a\u0430<span style=\"color: red;\">.<\/span>\u041a\u043e\u0434<span style=\"color: red;\">,<\/span> \u0412\u044b\u0431\u043e\u0440\u043a\u0430<span style=\"color: red;\">.<\/span>\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435<span style=\"color: red;\">)<\/span><span style=\"color: red;\">)<\/span><span style=\"color: red;\">;<\/span>\r\n    <span style=\"color: red;\">\u041a\u043e\u043d\u0435\u0446\u0426\u0438\u043a\u043b\u0430<\/span><span style=\"color: red;\">;<\/span>\r\n<span style=\"color: red;\">\u041a\u043e\u043d\u0435\u0446\u0415\u0441\u043b\u0438<\/span><span style=\"color: red;\">;<\/span>\r\n<\/pre>\n<h3>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435:<\/h3>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"https:\/\/www.about1c.ru\/v83\/language-reference\/queries\/query\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 1\u0421<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li><a href=\"https:\/\/www.about1c.ru\/v83\/language-reference\/queries\/query-result\">\u041e\u0431\u044a\u0435\u043a\u0442 \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0417\u0430\u043f\u0440\u043e\u0441\u0430<\/a><\/li>\n<li><a href=\"https:\/\/www.about1c.ru\/v83\/language-reference\/queries\/query-result-selection\">\u041e\u0431\u044a\u0435\u043a\u0442 \u0412\u044b\u0431\u043e\u0440\u043a\u0430\u0418\u0437\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0417\u0430\u043f\u0440\u043e\u0441\u0430<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0434 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0434\u044b) \u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0438\u043c\u0435\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435). \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87],"tags":[],"class_list":["post-2869","post","type-post","status-publish","format-standard","hentry","category-query-examples"],"_links":{"self":[{"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/posts\/2869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/comments?post=2869"}],"version-history":[{"count":5,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/posts\/2869\/revisions"}],"predecessor-version":[{"id":2922,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/posts\/2869\/revisions\/2922"}],"wp:attachment":[{"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/media?parent=2869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/categories?post=2869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.about1c.ru\/v83\/wp-json\/wp\/v2\/tags?post=2869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}