Skip to main content

RepeatedComponentBlockCondition

Defined in: parser/types.ts:1992

The RepeatedComponentBlockCondition interface is used to define a SkipCondition based on the number of correct or incorrect repeated components. You might use this if you need to check if an attention check was failed multiple times. This is similar to ComponentBlockCondition, but it only checks a specific repeated component.

Here's an example of how to use the RepeatedComponentBlockCondition:

{
...
"skip": [
{
"name": "attentionCheck",
"check": "repeatedComponent",
"condition": "numIncorrect",
"value": 2,
"to": "end"
}
]
...
}

In this example, when the number of incorrect responses to the repeated component with the name "attentionCheck" is two, the participant will be redirected to the end of the study. If the number of incorrect responses is less than two, the participant will continue to the next component in the sequence.

Properties​

PropertyTypeDescriptionDefined in
check"repeatedComponent"The check we'll perform.parser/types.ts:1996
condition"numCorrect" | "numIncorrect"The condition to check.parser/types.ts:1998
namestringThe name of the repeated component to check (e.g. attentionCheck).parser/types.ts:1994
tostringThe id of the component or block to skip toparser/types.ts:2002
valuenumberThe number of correct or incorrect responses to check for.parser/types.ts:2000