{"id":5350,"date":"2024-10-14T17:14:46","date_gmt":"2024-10-14T15:14:46","guid":{"rendered":"https:\/\/help.r2docuo.com\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/"},"modified":"2024-10-18T17:39:51","modified_gmt":"2024-10-18T15:39:51","slug":"how-to-make-related-documents-delete-in-cascade","status":"publish","type":"ht_kb","link":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/","title":{"rendered":"Have related documents deleted &#8220;in cascade&#8221;."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Docuo allows you to relate documents to each other by means of fields of type Drop-down List to Other Category.<\/p>\n\n<p class=\"wp-block-paragraph\">Thus, if in a category of Students, we have a field of this type called &#8220;Province&#8221; that relates them to a category of Provinces, we could have 20 students who have chosen the value &#8220;Madrid&#8221; in that field.<\/p>\n\n<p class=\"wp-block-paragraph\">The question is, what do we want to happen if now someone deletes the province &#8220;Madrid&#8221;?<\/p>\n\n<p class=\"wp-block-paragraph\">The default behavior is that the 20 students who previously had the value &#8220;Madrid&#8221; in the &#8220;Province&#8221; field will now have that field blank (empty).<\/p>\n\n<p class=\"wp-block-paragraph\">However, in some scenarios, we might want to <strong>remove the 20 students who were from Madrid by deleting the Madrid province.<\/strong><\/p>\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\">Make sure you understand the implications of the following settings to avoid unintentional data loss.<\/p>\n\n<p class=\"wp-block-paragraph\">To do this, set the &#8220;Cascade Delete&#8221; option in the Drop-down List type field to Other Category:<\/p>\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a67f9ca20315&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a67f9ca20315\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"582\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png\" alt=\"\" class=\"wp-image-5348\" srcset=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png 794w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25-600x440.png 600w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25-768x563.png 768w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25-50x37.png 50w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25-60x44.png 60w, https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25-100x73.png 100w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Cascading deletion owes its name to the fact that records that are deleted could in turn be related to others that, if they have this setting active, would also be deleted.<\/p>\n\n<p class=\"wp-block-paragraph\">If you have a Country category, related to a Province category, related to a Population category and related to a Citizen category, and all these relationships are configured to &#8220;cascade delete&#8221;, simply deleting a country would do all this:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>By erasing the country, its provinces would be erased.<\/li>\n\n\n\n<li>By deleting each province, their populations would be erased.<\/li>\n\n\n\n<li>By deleting each population, its citizens would be deleted.<\/li>\n<\/ul>\n\n<p class=\"wp-block-paragraph\">And in this way all the citizens of a country would be erased by erasing the country.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docuo allows you to relate documents to each other by means of fields of type Drop-down List to Other Category. Thus, if in a category of Students, we have a field of this type called &#8220;Province&#8221; that relates them to a category of Provinces, we could have 20 students who&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","footnotes":""},"ht-kb-category":[63],"ht-kb-tag":[],"class_list":["post-5350","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-fields"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Have related documents deleted &quot;in cascade&quot;. - R2 Docuo | Help center<\/title>\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=\"Have related documents deleted &quot;in cascade&quot;. - R2 Docuo | Help center\" \/>\n<meta property=\"og:description\" content=\"Docuo allows you to relate documents to each other by means of fields of type Drop-down List to Other Category. Thus, if in a category of Students, we have a field of this type called &#8220;Province&#8221; that relates them to a category of Provinces, we could have 20 students who...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/\" \/>\n<meta property=\"og:site_name\" content=\"R2 Docuo | Help center\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-18T15:39:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png\" \/>\n\t<meta property=\"og:image:width\" content=\"794\" \/>\n\t<meta property=\"og:image:height\" content=\"582\" \/>\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\\\/how-to-make-related-documents-delete-in-cascade\\\/\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/\",\"name\":\"Have related documents deleted \\\"in cascade\\\". - R2 Docuo | Help center\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-25.png\",\"datePublished\":\"2024-10-14T15:14:46+00:00\",\"dateModified\":\"2024-10-18T15:39:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/#primaryimage\",\"url\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-25.png\",\"contentUrl\":\"https:\\\/\\\/help.r2docuo.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/image-25.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/help.r2docuo.com\\\/en\\\/knowledge-base\\\/how-to-make-related-documents-delete-in-cascade\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/help.r2docuo.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Have related documents deleted &#8220;in cascade&#8221;.\"}]},{\"@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":"Have related documents deleted \"in cascade\". - R2 Docuo | Help center","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":"Have related documents deleted \"in cascade\". - R2 Docuo | Help center","og_description":"Docuo allows you to relate documents to each other by means of fields of type Drop-down List to Other Category. Thus, if in a category of Students, we have a field of this type called &#8220;Province&#8221; that relates them to a category of Provinces, we could have 20 students who...","og_url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/","og_site_name":"R2 Docuo | Help center","article_modified_time":"2024-10-18T15:39:51+00:00","og_image":[{"width":794,"height":582,"url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.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\/how-to-make-related-documents-delete-in-cascade\/","url":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/","name":"Have related documents deleted \"in cascade\". - R2 Docuo | Help center","isPartOf":{"@id":"https:\/\/help.r2docuo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/#primaryimage"},"image":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/#primaryimage"},"thumbnailUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png","datePublished":"2024-10-14T15:14:46+00:00","dateModified":"2024-10-18T15:39:51+00:00","breadcrumb":{"@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/#primaryimage","url":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png","contentUrl":"https:\/\/help.r2docuo.com\/wp-content\/uploads\/2024\/10\/image-25.png"},{"@type":"BreadcrumbList","@id":"https:\/\/help.r2docuo.com\/en\/knowledge-base\/how-to-make-related-documents-delete-in-cascade\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/help.r2docuo.com\/"},{"@type":"ListItem","position":2,"name":"Have related documents deleted &#8220;in cascade&#8221;."}]},{"@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\/5350","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=5350"}],"version-history":[{"count":0,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb\/5350\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/media?parent=5350"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=5350"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/help.r2docuo.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=5350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}