Skip to Main Content

DU REDCap Support

How to make changes to a project in production without losing your data

Making changes to your project once you’ve started collecting data can cause data loss. This is why we strongly recommend you put your project into Production before collecting data – in Production mode, any project changes that could result in data loss require administrative approval.

To modify a project once you’ve started collecting data, follow these rules to protect your data:

1. Make a back-up before you start -- download a copy of the current Data Dictionary and a copy of your current data, just in case anything goes wrong.

2. Don't delete questions or answer choices, or change variable names (see below for more info)

3. Don't change the numeric codes associated with answer choices (see below for more info)

4. Don't drag and drop a new instrument into the first position, because this can move the record_id field and delete all your data (see below for more info)

5. Don't change Text Box (Short Text) or Notes Box (Paragraph) fields into any other type of field -- it will delete all your existing data in the field.

6. Instrument names -- don't change them via the Data Dictionary, or you'll lose all data on form completeness. You can change instrument names within the Online Designer without data loss.

Don't delete questions or answer choices, or change variable names

Variable names:

  • If you delete a question/variable, all data stored for that variable will be lost.
    • As an alternative, consider using an Action Tag to hide the question.
  • If you delete an answer choice, all data stored for that answer choice will be lost.
    • As an alternative, consider using an Action Tag to hide the answer choice.
  • If you change an existing variable name, REDCap sees that as deleting an existing question/variable and adding a new one, so all data stored for that variable will be lost.
    • There's no good alternative for changing a variable name once you've collected data -- you'll either need to you'll either need to stick with the old variable name or be willing to re-import data for that question.

REDCap stores all data for a qusetion under the Variable Name, in the upper right hand corner of the Edit Question Box. REDCap stores answer choice data under numericREDCap stores answer choice data under numeric codes. "Chips" is the label for an answer choice, and "1" is its raw code/value. In the lower-left-hand question of the Edit Question box, you can click the Action Tags icon to see the full list of available Action Tags

Using Action Tags to hide a question or answer choice:

You can add an Action Tag to a question in the bottom left-hand corner of the edit question box. Click the Action Tags icon to see the full list of Action Tags options and their descriptions. The most commonly used tags are:

  • @HIDDEN -- Hides the question/field on the survey page, the data entry form, and in the REDCap mobile app. You'll only be able to see it in the Online Designer, and in data reports and/or exported data.
  • @HIDECHOICE -- Hides one or more choices of a multiple choice field. You can hide a choice for which you've previously collected data (as opposed to deleting the choice, which deleted the data). The format must follow the pattern @HIDECHOICE='??', in which the coded values should be inside single or double quotes for the choice(s) you wish to hide. If more than one choice needs to be hidden, then provide all the coded values separated by commas.
    • For example, to hide the choice 'Chips', which is coded as '1', enter this Action Tag: @HIDECHOICE='1'
    • To hide both 'Chips' and 'Beans,' which is coded as '6', enter this Action Tag: @HIDECHOICE='1,6'

Avoid label mistmatch errors -- don't change the codes associated with answer labels

Answer choices: don't change the associated numeric code!

  • If you change the numeric code associated with an answer choice label, you'll lose the data for the answer choice and/or get it mixed up with data from other answer choices. This is known as a label mismatch error.
  • In the example below, “Chips” is the label for the first answer choice, and ‘1’ is its code/raw value.
    • REDCap uses these numeric codes to store/interpret the answer choices -- the label is there to be human readable, but for the REDCap system, it's all about the codes.

“Chips” is the label for the first answer choice, and ‘1’ is its code/raw value


Example of change where you will lose data – this is known as a label mismatch error:

Old Values: New Values:
1, Chips 1, Chips
2, Yellow Cheese 2, Yellow Cheese
3, Orange Cheese 3, Orange Cheese
4, Other 4, White Cheese
  5, Other

Because the new code of “Other” is now ‘5,’ any data that was entered as “4, Other” will now be given the value of “4, White Cheese” because REDCap only looks at the numeric codes and not the text-based answer labels after the codes.


Corrected example -- adding a new answer choice without a label mismatch error:

Old Values: New Values:
1, Chips 1, Chips
2, Yellow Cheese 2, Yellow Cheese
3, Orange Cheese 3, Orange Cheese
4, Other 4, Other
  5, White Cheese

Here you successfully added a new answer choice without changing the codes associated with the previous value. The value for “Other” may now appear in the middle of your answer choice list, but it’s better than losing all your “Other” data!


Ideal Example -- plan ahead to avoid label mismatch errors!

Old Values New Values:
1, Chips 1, Chips
2, Yellow Cheese 2, Yellow Cheese
3, Orange Cheese 3, Orange Cheese
99, Other 4, White Cheese
  99, Other

When building instruments, consider choosing a standard high number such as ‘99’ as the code for “Other,” or ‘77’ as the code for “Not applicable.” This allows you to add other answer choices in as needed and leave the “Other” option at the end of the list.

Don't drag and drop a new instrument into first position

record_id – don’t change or move this variable name, because doing so will delete all of the data in your project.

The record_id field should always be the first field of your first instrument in the project, because the record_id field is what REDCap uses to link together all the data in a particular record. If you drag and drop a new instrument into the first position in the list, it can move this all-important record_id field and delete all your data.

When you create a new project, the record_id is the first field in the default “Form 1” that comes with every new project. If you wish, you can rename the record_id variable name (to something such as study_id or participant_id) as soon as you create the project. But once you start entering data, changing the variable name of the record_id field will delete all of the data in your project, because you’ve essentially deleted the key that allows REDCap to understand where the data belongs.

The record_id should always be the first field in the first instrument in your project

Steps for Making Changes to a Project in Production

1. Download a copy of the Current Data Dictionary and a copy of the project’s existing data via a data export (go to ‘Data Exports, Reports, and Stats’ in the Project ).

2. Select ‘Online Designer’ on the Project Setup page.

3. Click on Enter Draft Mode.

4. Click on the form(s) that need changes made and make the changes just as you would while in Development mode.

5. After making all of the changes, go back to the Online Designer page and click on “Submit Changes for Review”.

6. If you want to view all of your changes before you submit them click on “View detailed summary of all drafted changes.” If you want to remove the changes you made, click on “Remove all drafted changes”

7. If the changes will not affect existing data in any way, the changes will be automatically applied once you submit them.

8. Otherwise, the REDCap Team will receive a copy of your changes and contact you about them. If you want to know why the changes did not get automatically approved by REDCap, click on “Why weren’t my changes made automatically?”