1. Home
  2. Administrators
  3. Data fields
  4. Have related documents deleted “in cascade”.

Have related documents deleted “in cascade”.

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 “Province” that relates them to a category of Provinces, we could have 20 students who have chosen the value “Madrid” in that field.

The question is, what do we want to happen if now someone deletes the province “Madrid”?

The default behavior is that the 20 students who previously had the value “Madrid” in the “Province” field will now have that field blank (empty).

However, in some scenarios, we might want to remove the 20 students who were from Madrid by deleting the Madrid province.

Make sure you understand the implications of the following settings to avoid unintentional data loss.

To do this, set the “Cascade Delete” option in the Drop-down List type field to Other Category:

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.

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 “cascade delete”, simply deleting a country would do all this:

  • By erasing the country, its provinces would be erased.
  • By deleting each province, their populations would be erased.
  • By deleting each population, its citizens would be deleted.

And in this way all the citizens of a country would be erased by erasing the country.

Updated on 18 de October de 2024
Was this article helpful?

Related Articles