Closing cases on import
The excel importer also has the ability to close cases. To do this, add a column to your excel file to specify which cases to the excel file to be mapped to the case and supply case or external id's for matching. In the following table, cases 1001 and 1002 will both be closed, but 1003 will not. Note that the close property needs to be added manually to your excel file.
Prepare your Excel workbook for import.
- Go to 'Export Cases'
- Download "Open Cases"
- This will give you access to the unique Case Id which will be random and look something like "2fa35b2d-e685-408f-99d5-17e215598fa1"
- Once you have identified the cases you would like to close, delete all columns except for the case id.
- Add a "close" column, and complete each cell with the word 'yes'.
- Save your file as a .xls or .xlsx
Note: Please check that you have saved your workbook as a .xls or .xlsx file.
Note: Prepare a separate excel file for each "case type" you would like to update.
Note: Closing cases on import only works when you are Updating Existing Cases. It will not work when you are Creating New Cases. If you want to open and close cases using import, you have to do it in three steps: Create the new cases, Export the cases to get their case_id's, and then Update the cases with the "close" column as described below.
Specify the "case type" of the file you are importing.
Next, map this column to the "close" property of a case. This isn't a real property, so use the "Create a new property instead" option to enter it.
Now, once you finish the import, all cases with a "yes" in the mapped column will be closed.
Note: To verify this import was successful, you can 'Export Cases' , select Open Cases, and review the Excel export to confirm that the cases no longer appear.
Note: It is not currently possible to reopen a closed case using the Excel Importer. To do that you must use the Archive Forms tool to archive the form which closed the case. Closing a case using Excel Importer creates a submission for an "unknown" form in the case history, which can be archived to undo closing, i.e., reopening, the case.
To verify that your cases have been closed
Go to Reports > under the Inspect Data section > Case List. Run a report for the same case type you have uploaded. The report should show a Status column, and show closed for the relevant cases.