{"id":4178,"date":"2021-04-20T12:33:47","date_gmt":"2021-04-20T10:33:47","guid":{"rendered":"https:\/\/help.r2docuo.com\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/"},"modified":"2023-11-06T09:20:45","modified_gmt":"2023-11-06T08:20:45","slug":"formulas-in-the-new-document-action-of-the-process","status":"publish","type":"ht_kb","link":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/","title":{"rendered":"Automatic action: Create a new document"},"content":{"rendered":"<h3><strong>How does it work<\/strong><\/h3>\n<p>In the process of a category, we can define a series of automatic actions that are carried out when advancing through a transition. One of them is the &#8220;New Document&#8221; action:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3447 size-full\" src=\"https:\/\/helpr2docuo.wpengine.com\/wp-content\/uploads\/2021\/04\/0001.png\" alt=\"\" width=\"999\" height=\"700\" srcset=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001.png 999w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001-300x210.png 300w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001-768x538.png 768w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001-50x35.png 50w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001-60x42.png 60w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0001-100x70.png 100w\" sizes=\"auto, (max-width: 999px) 100vw, 999px\" \/><\/p>\n<p>This functionality allows you to create a new document from another category and thus link several workflows.<\/p>\n<p>The New Document window allows you to choose the category of the document to be created:<\/p>\n<p><a href=\"https:\/\/helpr2docuo.wpengine.com\/wp-content\/uploads\/2021\/04\/0002-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3449\" src=\"https:\/\/helpr2docuo.wpengine.com\/wp-content\/uploads\/2021\/04\/0002-1.png\" alt=\"\" width=\"731\" height=\"463\" srcset=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0002-1.png 731w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0002-1-300x190.png 300w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0002-1-50x32.png 50w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0002-1-60x38.png 60w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0002-1-100x63.png 100w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/a><\/p>\n<p>In this window, the option &#8220;Only when the following condition is met&#8221; allows you to write a JavaScript formula to decide in which cases the document should be created.<\/p>\n<p>The formula must return a boolean value (true\/false) that indicates if the condition is met based on the values of the fields of the original document:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3450\" src=\"https:\/\/helpr2docuo.wpengine.com\/wp-content\/uploads\/2021\/04\/0003.png\" alt=\"\" width=\"546\" height=\"343\" srcset=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0003.png 546w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0003-300x188.png 300w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0003-50x31.png 50w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0003-60x38.png 60w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/04\/0003-100x63.png 100w\" sizes=\"auto, (max-width: 546px) 100vw, 546px\" \/><\/p>\n<h3><\/h3>\n<h3><strong>What is it for<br \/>\n<\/strong><\/h3>\n<p>This functionality has many applications. One of the most interesting is to create <strong>several &#8220;New Document&#8221; actions of different categories<\/strong> in the same transition and configure the formulas of each of them so that only the appropriate one is fulfilled in each case.<\/p>\n<p>For example, a <em>Request<\/em> category moving through a transition in its process might create: a new <em>Cancellation<\/em> category document or a new <em>Change<\/em> category document. You can configure the creation of the two documents and the formula of both actions so that only the appropriate one is executed depending on the type of request.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How does it work In the process of a category, we can define a series of automatic actions that are carried out when advancing through a transition. One of them is the &#8220;New Document&#8221; action: This functionality allows you to create a new document from another category and thus link&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","footnotes":""},"ht-kb-category":[65],"ht-kb-tag":[],"class_list":["post-4178","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-automation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Automatic action: Create a new document - R2 Docuo | Help center<\/title>\n<meta name=\"description\" content=\"This functionality allows you to create a new document from another category and thus link several workflows.\" \/>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automatic action: Create a new document - R2 Docuo | Help center\" \/>\n<meta property=\"og:description\" content=\"This functionality allows you to create a new document from another category and thus link several workflows.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/\" \/>\n<meta property=\"og:site_name\" content=\"R2 Docuo | Help center\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-06T08:20:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png\" \/>\n\t<meta property=\"og:image:width\" content=\"845\" \/>\n\t<meta property=\"og:image:height\" content=\"564\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@R2Docuo\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/\",\"name\":\"Automatic action: Create a new document - R2 Docuo | Help center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"datePublished\":\"2021-04-20T10:33:47+00:00\",\"dateModified\":\"2023-11-06T08:20:45+00:00\",\"description\":\"This functionality allows you to create a new document from another category and thus link several workflows.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/#primaryimage\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"contentUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Post-type-Guias-de-usuario.png\",\"width\":845,\"height\":564},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/formulas-in-the-new-document-action-of-the-process\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/help.r2docuo.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automatic action: Create a new document\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#website\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/\",\"name\":\"R2 Docuo | Help center\",\"description\":\"Todos los recursos para usuarios, administradores y desarrolladores de de R2 Docuo a tu alcance\",\"publisher\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/help.r2docuo.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#organization\",\"name\":\"R2 Docuo | Help center\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ILUDEST_CENTRODEAYUDA.png\",\"contentUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/ILUDEST_CENTRODEAYUDA.png\",\"width\":1200,\"height\":630,\"caption\":\"R2 Docuo | Help center\"},\"image\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/R2Docuo\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/r2docuo\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automatic action: Create a new document - R2 Docuo | Help center","description":"This functionality allows you to create a new document from another category and thus link several workflows.","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Automatic action: Create a new document - R2 Docuo | Help center","og_description":"This functionality allows you to create a new document from another category and thus link several workflows.","og_url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/","og_site_name":"R2 Docuo | Help center","article_modified_time":"2023-11-06T08:20:45+00:00","og_image":[{"width":845,"height":564,"url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@R2Docuo","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/","url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/","name":"Automatic action: Create a new document - R2 Docuo | Help center","isPartOf":{"@id":"https:\/\/help.r2docuo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/#primaryimage"},"image":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/#primaryimage"},"thumbnailUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","datePublished":"2021-04-20T10:33:47+00:00","dateModified":"2023-11-06T08:20:45+00:00","description":"This functionality allows you to create a new document from another category and thus link several workflows.","breadcrumb":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/#primaryimage","url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","contentUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2021\/03\/Post-type-Guias-de-usuario.png","width":845,"height":564},{"@type":"BreadcrumbList","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/formulas-in-the-new-document-action-of-the-process\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/help.r2docuo.com\/"},{"@type":"ListItem","position":2,"name":"Automatic action: Create a new document"}]},{"@type":"WebSite","@id":"https:\/\/help.r2docuo.com\/#website","url":"https:\/\/help.r2docuo.com\/","name":"R2 Docuo | Help center","description":"Todos los recursos para usuarios, administradores y desarrolladores de de R2 Docuo a tu alcance","publisher":{"@id":"https:\/\/help.r2docuo.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/help.r2docuo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/help.r2docuo.com\/#organization","name":"R2 Docuo | Help center","url":"https:\/\/help.r2docuo.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.r2docuo.com\/#\/schema\/logo\/image\/","url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2023\/06\/ILUDEST_CENTRODEAYUDA.png","contentUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2023\/06\/ILUDEST_CENTRODEAYUDA.png","width":1200,"height":630,"caption":"R2 Docuo | Help center"},"image":{"@id":"https:\/\/help.r2docuo.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/R2Docuo","https:\/\/www.linkedin.com\/company\/r2docuo"]}]}},"_links":{"self":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb\/4178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/comments?post=4178"}],"version-history":[{"count":0,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb\/4178\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/media\/4053"}],"wp:attachment":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/media?parent=4178"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=4178"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=4178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}