Note : This feature (Deleting Case Types/Properties) will only be available to CommCare project spaces with an Advanced Plan or higher. For more details, see the CommCare Software Plan page.
Overview
You can delete case types or case properties using the Data Dictionary. This is useful when a project space has many case type and case properties which were created in error but are actually not relevant to you. A deleted case type will no longer be selectable as a filter in the reporting filtering menu, and will not be a case type filter option for case exports/imports.
Deleting Case Types using Data Dictionary
You can delete a case type in the Data Dictionary in following conditions:
There is no case data stored for the case type in the project space
There was case data stored for the case type but all of the case data of that case type is now archived
Deleting a Case Type
To delete a case type from the Data Dictionary:
Click on the "Data" menu item and then select "Data Dictionary" from the left pane.
Navigate to the case type under Data Dictionary and select the case type you want to delete.
At the Case Type level, you should see an option to delete the case type
Note : In case you are not able to see an option to delete the case type, it means that case type stores some data for the project and hence cannot be deleted.
Upon clicking on the “Delete Case Type” button, you will see a pop-up message seeking confirmation from you to proceed with the deletion of the case type. Clicking on “Delete” will delete the case type from the Data Dictionary.
Restoring a Deleted Case Type
You cannot restore the deleted case type from the Data Dictionary. You can however, simply create the deleted case type again. Alternatively, if the case type is being used by an application, making an update to the application will cause the case type to automatically be created in the Data Dictionary.
The Impact of Deleting a Case Type
Once a case type is deleted from the Data Dictionary :
All the features using the case type filter dropdown option will not include deleted case types as available options, This includes features like Case Lists, Case List Explorer, Case Data Exports etc.
It will not be possible to create a new case data export using a deleted case type.
Existing exports using deleted case types will not be affected.
Users will not be able to import deleted case types using Excel.
A new automatic rule cannot be created using a deleted case type. Existing rules using deleted case types will not be affected.
All case properties defined under this case type in the Data Dictionary will also be deleted.
The Application using the case type remains unaffected. When a case type is deleted from the Data Dictionary the underlying case properties can still be referred back in an application. And if the case type is added back to Data Dictionary, the deleted case properties will automatically added back to data dictionary configuration of that case type
Difference between Deprecating and Deleting a Case Type
One major difference between deprecating a Case Type and deleting a case type from the Data Dictionary is that you can only delete a case type which doesn’t have associated data with it but you can deprecate a case type even if it has data associated with it.
You can un-deprecate a deprecated case type but there is no way to undelete a deleted case type. You can however, always add the deleted case type back to the Data Dictionary.
Deleting Case Properties using Data Dictionary
You can delete the case property using the Data Dictionary for the following scenarios:
None of the cases for the particular case type has any data stored into that case property
The case property did store some data for the particular case type but all of that data has been archived.
Deleting a Case Property
To delete a case property under a case type from the Data Dictionary:
Click on the "Data" menu item and then select "Data Dictionary" from the left pane.
Navigate to the case type under Data Dictionary and select the case type.
You should see an option to delete the case property (shown as “Garbage bin icon” on the right).
Note : If you cannot see the delete option for the case property, it means that it has some data stored for the project.
Upon clicking on the “Delete” button, you will see a pop-up message seeking confirmation from you to proceed with the deletion of the case property. Clicking on “Delete” in the confirmation popup will mark the case property for deletion in the Data Dictionary.
Similar to deprecating a case property, the action for deleting a case property will only happen once the “Save” button is clicked in the upper-right corner. If you would like to cancel deleting a case property, you can simply refresh the page or navigate to a different case type.
Restoring a Deleted Case Property
You cannot restore the deleted case property from the Data Dictionary. You can however, always add the case property back which you had deleted initially.
The Impact of Deleting a Case Property
Once a case property of a case type is deleted from the Data Dictionary :
Deleted case property will not be available for configuration of reports using features like Case Data Export setups and Case List Explorer.
While setting up a Case Data Export for a case type, the deleted case property will not be available to be included in the configuration of export.
While using Case List Explorer, the deleted case property will not be available to be included in the selected columns.
Existing exports using deleted case properties will not be affected.
Custom descriptions for the case property will no longer show up in the form builder or case exports.
Any validation rules set up on this case property will no longer be applied on case imports.
Difference between Deprecating and Deleting a Case Property
One major difference between deprecating a case property and deleting a case property from the Data Dictionary is that you can only delete a case property which doesn’t have associated data with it but you can deprecate a case property even if it has data associated with it.
You can un-deprecate a deprecated case property but there is no way to undelete a deleted case property. You can however, always add back the deleted case property in the Data Dictionary.