Blog from July, 2024

A bug emerged in the July 15th upgrade to REDCap version 14.4.1 bug that involves calculated fields with equations that sum values collected in free form text fields using the "+" sign

  • By free form text fields, we mean text fields to which a validation rule was not applied.
  • By using the "+" sign, we mean an equation that includes a "+" operator, such as of [n1] + [n2].

Bug Description

If a calculation contains a "+" operator and a free form text field, the values are being concatenated, instead of being summed. For example, if the calculated field is supposed to return the sum of [n1] + [n2], and the value captured in [n1] is 4 and the value captured in [n2] is 5, the calculated field returns 45, instead of 9. See an example of the bug.

We have reported this bug to the development team at Vanderbilt, who distributes the REDCap software and maintains the code, but we do not have a timeline for when a fix will be released that we can upgrade to.

Intended Audience & Prerequisites

Intended Audience

Prerequisite Knowledge & Experience

  • Basics training or comparable experience and knowledge

  • Working knowledge of the Online Designer and Codebook



How to Protect Your Project from this Bug

On July 18th, we identified 100 projects that might be impacted by this bug because their project included at least one calculated field that contained a "+" operator. We emailed the project point persons with instructions for checking if their projects are impacted by the bug and for applying a fix. However, since then you or another builder on your team could have created or are planning to create text fields used in calculations that would be impacted by this bug.

Use Validation Rules

Validation rules are your friend. Applying validation rules to text fields has been a long standing recommendation for the following reasons: 1) to promote data quality when data is entered, and 2) because there are dependencies in other components of the project, such as a Data Quality rules, that rely on a validation rule communicating something critical about the kind of data collected in a field.

To protect your project from this bug, apply an integer or number validation rule to any text field collecting a numerical value.

Check Your Project for Free Form Text Fields

  • Using the Codebook is an easy way to check if your project has free form text fields that do not have a validation rule applied to them. In your project, you can find a link to the Codebook in the Project Home and Design section of the left-hand navigation menu. See the screenshot below.

    Codebook link in the left-hand nav


  • In the right-hand column of the Codebook, look for text fields.
  • If a validation rule has been applied to the field, it will be noted in a parenthetical statement, i.e. text (integer). See the screenshots below for Codebook examples of text fields with validation rules applied and free form text fields without validation rules applied.

    Text field WITHOUT validation rule

    Text field with validation rule applied

Apply Validation Rule(s)

You can apply a validation rule to a text field either 1) at the time the field is being created, or 2) after the field has been created by editing the field.

If your project has already been moved to Production, editing a field to apply a validation rule is a form change that will require you to Enter Draft Mode. If you have never form changes to a project in Production, there is helpful information in the REDCap FAQ under Making production changes tab. Entering Draft Mode is also demonstrated in the Making Production Changes video posted to the production changes page in the wiki.

Using the Codebook

  • When you check the Codebook, if you find a free form text field, you can click on the pencil icon, in the far-left column. See the screenshot below. 
  • This will pop-up a window with Edit Field tool screen where you can select the validation rule for the field. See the screen shot in the next section.

    Pencil icon in the Codebook

When Creating or Editing a Text Field

  • When you are create or edit a text field in the Online Designer, apply a Validation rule is one of the many attributes you can configure. See the screen shot below.

    Selecting a Validation rule



Upgrade to 14.4.1 Complete
VersionUpgrade Date
14.4.1

 

New Features

No new features.

Changes & Improvements

Bug fixes.

New ways to edit matrix fields

With the release of REDCap version 14.3.13, matrix fields can now be edited in some new and easy-to-use ways.


Convert radio or dropdown fields into a matrix

When wanting to combine separate radio or dropdown fields into a matrix you can:

  1. Use Shift + click (or Command + click if you're on a Mac) to select multiple fields

  2. Select the button that says "Convert to matrix group"

  3. Confirm your selection by clicking the "Convert fields" button


When combining fields into a matrix note that:

    • Only the choices for the first field will be applied to the new matrix group columns
    • If there are multiple section headers, only the top section header will be kept



Split a matrix group into separate fields

When wanting to split a matrix into separate radio button fields you can:

  1. Click the pencil icon to edit the matrix group

  2. Select the button "Save & split matrix into separate fields"

  3. Confirm you choice by clicking the "Split matrix" button