When attempting to change the field type or delete a field containing existing data in your project, you'll receive one of the following error messages:
- "This field type cannot be edited because it contains data."
- "Unable to delete a field that has existing data. Please remove any data from the field before deleting."
To prevent this error, you must first clear any existing data from the field you wish to change or delete:
- Select all records in your project, open the three-dot overflow menu, and choose Download metadata to export a metadata spreadsheet.
- You can use the Select all checkbox at the top row of the project table to select all records displayed on the page. If there are additional records not displayed, you can click the Select all items in the project link to select all records in your project.
- Save these exported records in a safe place. You'll use this spreadsheet to re-import your data after clearing the field.
- You can use the Select all checkbox at the top row of the project table to select all records displayed on the page. If there are additional records not displayed, you can click the Select all items in the project link to select all records in your project.
- Create a copy of your exported metadata spreadsheet and save it as a separate file from your original preserved data.
- In your copied spreadsheet, enter the word CLEAR (case-sensitive) in each row under the column corresponding to the field that you wish to clear and save your changes.
- Return to your project, open the Add drop-down menu, and select Import Metadata to import your copied spreadsheet.
On import, the system will recognize the CLEAR command and remove all values from the corresponding field. You can now change the field type or delete the field from your project and, if applicable, use your original exported metadata spreadsheet to re-import your data into the updated field.