Start a conversation

Can I hide a field that was previously used, without deleting already collected data?

Hiding a field which already contains data can be done by using dependencies

Before you start:

  • Make sure that the study setting "clear inapplicable field child" is set as "no" in order to prevent data loss. This can be done in Settings > Study > Other > "clear inapplicable child fields". Please note that this setting is only applicable to study and report forms, not to surveys. For surveys, once the field is hidden by using a dependency, the data will be deleted if the dependency is changed and field becomes visible again. If you delete the dependency, the data in a dependent field in a survey will not be deleted.

  • As a precaution, always do a data backup before implementing any changes.
  • Once the field is hidden, the data will still be exported. If you would like to disable the export of data for this field, click on the pencil icon next to to this field. In the Edit dialog window navigate to Advanced > set Exclude field in data exports to Yes

After taking all the above into consideration, you can proceed to hide the field as such:

  1. Create a calculation field, and set the calculation template as "1". You can also choose to hide this field as highlighted in the screenshot to make sure it doesn't appear in the actual forms.
  2. Create a dependency by navigating to the Edit tab of the field you wish to hide. Make it dependent on the above calculation, setting the dependency as "is equal to 0".  Since the calculation will always output 1, and the dependency is set to show the question only when the calculation field outputs 0, this condition will not be met. The field will always be hidden.

Choose files or drag and drop files
Was this article helpful?
  1. Castor Support Team

  2. Posted
  3. Updated