Build automated queries with data validation explains the mechanism. This page gives you the rules most protocols need, ready to copy.
🔑 Prerequisite: eCRF Builder (Edit), and a study in Draft or Suspended status.
Pick the severity first
Severity | Use it for |
Information | A reminder that needs no action: "Value above 140, record an AE if clinically significant" |
Warning | A value that is possible and unusual. The site confirms or corrects, and Datacapt raises an automatic query |
Exclusion | An answer that makes the subject ineligible under the protocol |
Disqualified | Screening forms sent to participants, where a wrong answer ends the questionnaire |
Datacapt checks a rule when the site saves the answer, not while typing.
Ranges
Check | Question | Rule |
Systolic pressure plausible |
| Lower than 70 → Warning. Second rule: Greater than 220 → Warning |
Temperature in °C, not °F |
| Greater than 45 → Warning "Check the unit: enter °C" |
BMI eligibility 18.5 to 30 |
| Lower than 18.5 → Exclusion. Greater than 30 → Exclusion |
Pain score triggers AE reminder |
| Greater or equal 7 → Information |
💡 Tip: set Min number and Max number on the question for values that cannot exist (a weight of 900 kg). Keep data validations for values that can exist and need a second look. The first blocks entry; the second opens a conversation with the site.
Dates
Check | Question | Rule |
No date in the future | Any Date/time | Tick Disable future dates on the question. No rule needed |
Consent before any procedure |
| Before, compare to Date linked |
AE end after AE start |
| Before, Date linked |
Adult at inclusion |
| Lower than 18 → Exclusion |
Sample within 2 hours of dose |
| More than (after), period 2 Hours, Date linked |
Visit windows
Datacapt has no window setting on the visit itself. Two blocks do the job.
Step | Block |
Show the target date to the site | A Calcul question, type Calculate Date / Time: reference |
Flag a visit outside Day 14 ± 3 | On |
Cross-visit and cross-form checks
A rule can read a question from another form or another visit as an extra condition.
Check | Rule |
Pregnancy test required for women | On |
Weight change above 10 % | A Calcul |
Dose matches weight band | On |
What a validation cannot check
The content of a Text input, a Checkbox or a File upload question. For a required format such as initials, use a Dropdown or a Number question where you can.
A rule limited to one visit when the same variable name exists in several. Each visit has its own variable (
V1_SBP,V2_SBP), so write the rule on the one you target.A question with Hide in eCRF switched on. The Builder says "Data validation is unavailable when Hide in eCRF is enabled".
Two visits compared without a date question in each. Visits carry no date of their own, so add a visit date question at the top of each visit.
Test each rule twice
Enter one value that must fire the rule and one that must not, on a draft subject, logged in with a site role. Record both in your validation file with a screenshot. An inspector will ask how you tested your edit checks, and Datacapt deletes test subjects at go-live.

