Set maximum time to answer survey

Difficulty level: Difficult

What does the functionality do?

Suppose you want to set the time for answering a survey and define a maximum for this, e.g. a participant can only spend 30 seconds for answering 5 questions. If a participant required more time, a screen-out can possibly be assigned to his/her filled-out survey, according to which his/her survey data will not be considered in the analysis results. He/She can then, for instance, be excluded for participation in any follow-up survey.

Use case and how to set it up?

Prior to the survey with questions and corresponding answers, you can, for example, include the following elements in your survey: a text block and a value assignment.

A text block informs the participant that he/she has a maximum of 30 seconds to answer some questions. The time is started, as soon as this participant has clicked the Next button; it is also ceased, when he/she has clicked the Next button again, a little further down the survey.

Using the formula datetime2number(today()) in a value assignment, you specify the exact time, expressed in milliseconds, for the variable you devised, e.g. StartDateTime. This is the time when the participant clicks the Next button (for answering the questions) for the first time in the survey.

VariableData typeIs equal to the following term:
StartDateTimeInteger numberdatetime2number(today())

In the Execute setting, ensure you select the option Every time the participant passes this point.

After this, you include all questions in the survey a participant has to answer within a certain amount of time. You define the maximum length of time in a filter further down.

After you have included all the questions, you can re-use the same formula as for starting the survey, i.e. datetime2number(today()), but this time with a different variable, e.g. EndDateTime. In this case, it refers to the time at which the participant clicks the Next button (for completing the questions) for the second time in the survey.

VariableData typeIs equal to the following term:
EndDateTimeInteger numberdatetime2number(today())

In the Execute setting, you can once again select the option Every time the participant passes this point.

Subsequently, you include a value assignment that allows you to calculate the difference in time between the variables EndDateTime (the time the survey was completed) and StartDateTime (the time the survey was started). This difference (the measured time) is calculated in milliseconds. For this calculation, you also have to create a variable, e.g. ReactionTime.

If you want to display the time duration for answering the survey to a participant, you can include a text block in the survey after the aforementioned value assignment. In this text block, you can include text like The reaction time in milliseconds is: {{custom.ReactionTime}}. The placeholder used for the time duration is always assigned the prefix custom. In order to include a custom placeholder, you can click the link labelled Rich text editor at the top right of the text box. You will then access the RTE window. For more information, please read the Rich Text Editor (RTE) article.

In order to convert the reaction time from milliseconds to seconds, for example, you can create the variable Seconds, for which you can specify the formula ReactionTime / 1000. The data type here will be a fractional number.

VariableData typeIs equal to the following term:
SecondsReal numberReactionTime / 1000

The option Every time the participant passes this point can now also be selected under the Execute setting.

The converted reaction time can, of course, be displayed in a text block to a participant. In this case, you will use the placeholder for the variable Seconds.

Finally, you include a forwarding element in your survey after the text block. In this, you can, for example, record that a participant’s survey will be assigned the Screenout status, if he/she requires more than 30 seconds to answer this survey.

If you click on the inserted forwarding element in the survey, you can define the closing text and filter condition(s) on the right-hand side of the screen. The closing text is the message displayed to a participant, when he/she fails to answer the survey within the stipulated time limit.

Once you have clicked the Add filter button, the Filter window appears allowing you to specify the condition(s) under which a message will or will not be shown to a participant.

  • Hide this element
  • if – Custom variable – Seconds – < 30

After you have completed the setup, you still need to click the green Save changes button.

Updated on July 18, 2023

Was this article helpful?

Related Articles

Need Support?
Please login to your Survalyzer account and use the "Create Support Request" form.
Login to Survalyzer