Check if a repeating data instance was added in EDC/CDMS
Table of Contents
Check with calculation
To check if a repeating data instance (e.g. an SAE form) was added, you can check if a required variable name on the repeating data has been defined. You need the following syntax to achieve this:
'##allowempty##';
if("{field_on_AE_repeating_data_structure}" == "'NA'"){
'No';
} else {
'Yes';
}
Note that '##allowempty##' is required in Castor to calculate something when a value is not set. Read more about Forcing Castor CDMS to calculate with empty fields.
Add the syntax above to your own calculation field. The calculation field should be located in the study structure or in another repeating data in case the repeating data structures are nested. Make sure you replace field_on_AE_repeating_data_structure with a (required) variable that appears in your own repeating data.
Set up a validation message
Now set up a validation message on this calculation field to warn the user that the repeating data is required: