Explanation of form status filtering on mobile devices

commcare

I would like to know the technical differences/important meanings behind the following five statuses of form on the mobile device. If you enter the 'saved forms' section of the app, we see four options (and my accompanying clarifying questions):

  1. All completed forms

*Does this include all forms that the user hit 'submit' form, and the list includes all sent and unsent forms?

  1. Only submitted forms
  2. Only unsent forms

*Does this list include forms that were completed on the tablet but not yet synced?

  1. Only incomplete forms
  2. Quarantined forms

*I am not clear on what 'quarantined' forms are or how a form gets into this state.

Additionally, regarding saved forms are kept on the device, what are the implications for how much space those saved forms take up?

Best Answer

Types of saved forms are listed below.

For general knowledge:

  • Saved forms are kept on device. The records are generally quite small, and won't affect much unless the forms include multimedia. CommCareHQ includes a configuration option to 'purge' saved forms after a certain number of days on device.
  • All completed forms includes sent and unsent forms
  • Unsent forms does include completed forms that haven't 'synced', but note that 'syncing' refers to a two-way data exchange (submit unsent forms, pull sync data), which is why the app refers to them as "unsent" rather than "unsynced"

All completed forms

Any form where the user has clicked the Finish button and the device has synced data to the local database (say, a new case is visible).

Quarantined forms are not included in this list or any others (other than the Quarantine list)

Only unsent forms

Completed forms which have not been submitted to the server

Only submitted forms

Forms which have been completed and are reflected on the server.

Only incomplete forms

Forms which have been saved as incomplete and are not processed by the user because they have not clicked Finish. Case changes from these forms will not be visible in case lists, and the forms will not be submitted to the server until the form is completed.

Quarantined forms

In exceptional circumstances it is sometimes the case that a form is completed but before it can be sent to the server some event occurs which renders the record unusable.

When this occurs, CommCare 'Quarantine's the form to prevent future problems (because otherwise forms entered after that form could not be submitted), but leaves the record on device for troubleshooting purposes.

If you long-click a record in the saved forms list you can choose Scan Record Integrity which will give you useful output about the record.

For a concrete example of when a Quarantine could occur

  • User Saves a form as complete while offline
  • User logs out of CommCare
  • User navigates to the directory where the encrypted files are saved to disk
  • User deletes the encrypted form record

When CommCare starts up next, it will look for the saved form to submit it to the server, and identify that the file itself is missing and quarantine the record after logging the event.