Field rules

Below are some commonly used field rules and rule combinations.

In this article

Skip if/unless rules

Sometimes you may want to hide a particular field based on how the previous question/s have been answered. You can do this by using 'skip if/unless' rules.

Example 1

For example, if you have the following questions,

Q1: Is the patient on antidepressants? (Yes/No field)

Q2: Please provide antidepressant name (text field)

and you want Q2 to only be available if Q1 has been answered as Yes, then you can add the following rule: ‘Skip unless Q1 has the value Yes’. This way, Q2 will be skipped if Q1 has been answered as No or has not been answered at all.

You can also add the rule ‘Required if Q1 has the value Yes’ to make the field required (i.e. the form cannot be saved unless the field has been answered or a reason has been provided).

'Skip unless' rule for a text field

Example 2

You may want a field to be shown based on how several previous questions have been answered. 

For example, you may want Q4 to be shown only when Q1, Q2, and Q3 have ALL been answered as No. In this case, you need to add the following rules.

'Skip unless' rules based on several questions

‘Skip unless’ rules 1-3 determine that Q4 only shows when all three previous questions have been answered as No. The ‘skip unless’ rules on the same field are evaluated independently, so the field only becomes available (not skipped) if all three 'unless' rules are met.

‘Required if’ rules 3-6 define that Q4 is required when all three questions are No.

Example 3

The example below shows a more complex case, in which Q2 is conditional on Q1 being Yes, Q3 is conditional on Q2 being Yes, and Q4 is shown if ANY of Q1-Q3 are No.

Here, rules 1 and 2 for Q2 and Q3 make them available and required only when the previous question is Yes. ‘Required if’ rules 1-3 for Q4 make it required when Q1-Q3 are No, and ‘skip if’ rule 4 defines that Q4 will be hidden if Q3 is Yes.

'Skip unless/if' rules based on several questions

Date rules

Date range

Sometimes you may need to check that that certain date falls within a specified date range. For example, you want to check that the date of a certain visit is 3 weeks after the date of consent plus/minus 5 days.

3 weeks = 21 days 

21 – 5 = 16 days 

21 + 5 = 26 days

Therefore, your rules need to be as follows: 

Date must be on or after date of consent + 16 days 

Date must be on or before date of consent + 26 days

Rules for date range

Age 18 or older

You may want to check that a participant's DOB corresponds to an age of 18 years or older at randomisation (or on any other date recorded in your CRF).

If age must be 18 or older, you need to add the following rule to the DOB field:

DOB must be on or before randomisation date – 18 years

Rule to check age is 18 or older at randomisation

If age must be 18 or older on a certain date, for example, the date of informed consent, you need to add the following rule to the DOB field:

DOB must be on or after date of consent – 18 years

Rule to check age is 18 or older on the date of consent

Age range

You may want to check that a participant’s DOB corresponds to a certain age range at randomisation (or on any date recorded on the CRF).

For example, if age must be between 18 and 60 years at randomisation, you need to add the following rules to the DOB field:

DOB must be on or before date when randomisation form is added – 18 years 

BOB must be on or after date when randomisation form is added – 60 years

Rules to check age at randomisation is within a certain range

Date must be the same as another date

You may want to check that a certain date is the same as another date.

For example, if the date the QOL questionnaire completed must be the same as the date of examination, you need to add the following rules to the date QOL questionnaire completed:

Date QOL questionnaire completed must be on or before date of examination 

Date QOL questionnaire completed must be on or after date of examination

Rules to check the date of questionnaire completion is the same as the date of examination

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us