Start a conversation

Field properties: validations (edit checks) and dependencies (field logic)

Data validation (real-time edit checks)

Messages can be used to inform users about required actions or warn them about possible errors, based on data they have entered.

Please note that the Data Validation tab is not available on the following fields: Time, Remark, Summary, QR code, Repeated Measure, Randomization, Image, Grid, Date and Time, Number and Date, Add a Report Button and Add a survey.

Follow these steps to set up a message:

  1. Click the 'Data validation' tab when creating/editing a field.
  2. Choose the condition (the entered value) that will prompt the message.
  3. Choose the message type.  There are four types of messages:
    • Message: A simple indication message, outlined in blue, that the user needs to take a certain action.
    • Warning: An orange coloured message bar appears to warn the user that something is incorrect.
    • Error: A red outlined message can be used to indicate data has been entered that is not accepted or wrong. When the error message type is displayed, the data for that field is not saved. This means that a subsequent field cannot be dependent on a value that would trigger the 'Error' message.
    • Exclusion: A message in purple that excludes the subject from the study; when this message is visible the user, it is possible to navigate to different steps in a form:
      • if an exclusion occurs on the study form, data entry is blocked on the entire study form and on any report instances. The Exclusion message will be displayed on every form in the study data view with the name of the step where the exclusion has been triggered. The report data view will be greyed out: 
      • if an exclusion occurs on a report instance form, data entry is blocked on that report instance form, but not blocked on any other report instances or study data.

        You can use this for validating inclusion and exclusion criteria. Please be aware, that it's not possible to leave fields with exclusion criteria empty (user missing), nor possible to enter values which are outside the boundaries you have set.

In the following example an exclusion message is set when the patient has not signed informed consent:

* NOTE: max. length of the message to show is 255 characters

Dependencies (field logic)

If you want to make a field dependent on another field, e.g. only show the question "Pregnant" when the field Gender is set to "Female", take the following steps:

  1. Click on the 'Dependencies' tab.
  2. Choose 'Yes' for the 'Field is dependent' property.
  3. Choose the Step where the parent field is located. The parent field is the field that your new field will be dependent on, such as 'Gender'.
  4. Choose the parent field.
  5. Choose an operator, e.g. 'equal to' or 'greater than' and then choose a value - this is the value the parent field should have in order for the new field to appear. 

In this example, the current field is only displayed when the field "Gender", on the Step "Demographics" is set to "Female":

Field dependencies will be displayed in the Form Builder alongside the field label - it will be shown in your Form that this field only appears when the defined rule is true:

Multiple dependencies

Currently it is only possible to select one condition for a dependency. If you want to set multiple dependencies, e.g. show your new field based on data entered in multiple other fields, then you will need to create a calculation field and use a template described in this article: Can I make a field dependent on multiple fields?

Video tutorial

Watch the video walk-through  on Castor Academy:

Dependencies (field logic) | Castor Academy

Data validations (edit checks) | Castor Academy

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

  2. Posted
  3. Updated