Criteria
So far we have created a new study in Ethica and added a few data sources to it to collect sensor data. We also added a few surveys and configured them both to be triggered by the participant at any time, or to be triggered at a certain time.
Here we want to discuss another powerful feature in Ethica called Criteria. Criteria is a condition that you assign to a part of your study, and they enable or disable that part depending on whether they are evaluated
True
or False
. Ethica continuously evaluates the criteria set in your study for each participant using their most recent responses and prompts each participant with the components that are evaluated as True
. This way, you can create a personalized experience for your participants.You can assign criteria to an activity, to a triggering logic, or a section of your survey, or to a single question. Here we should know how criteria can be used in our demo study. So far, we added a survey with a User-Triggered triggering logic that asked participants to share their motivation for exercise. We will add another survey and ask about their nutrition habits. Then we add a third survey that asks participants whether they want to participate in the Exercise Motivation part of the study, the Nutrition Habits part of the study, or both.
So let's go back to the Researcher Dashboard and click on Activities. Then create a new survey by clicking on the
New Activity
button. We assume you are already comfortable with creating a survey in Ethica. So we just go ahead and create one survey with the following configurations:- User-Triggered triggering logic with the button caption set to
Food Diary
. - Starts with an information block telling participants: "We want to know more about your dietary habits."
- Add an image question that asks "Please share a picture of the food or snack you are having."
Now go back to the Activities page, and add a new survey, with the following settings:
- User-Triggered triggering logic with the button caption set to
Select Your Survey
. - Add just one Multiple-Answer question on the
Content
page asking: "Which part of the study do you prefer to participate in?" - Add two choices to your question: Exercise and Nutrition.
So your survey's question flow should look like the following:

Question to ask participants to choose their survey
Take note of the ID of the question. Here the ID of the question is 1 (Q1). Also, note the ID of the choices you added. In the above example,
Exercise
is answer ID 1 (A1), and Nutrition
is answer ID 2 (A2). Publish the survey and go back to the Activities page. Your Activities page should now look like the following:
Activities list
Pay attention to the ID of each survey. You need these to set up your criteria. Your survey IDs definitely will be different than the ones we see in this example. For our example here, the IDs are as follow:
- ID 18345: Exercise Motivations
- ID 18347: Quality of Life
- ID 18350: Nutrition Habits
- ID 18351: Survey Selector
Now we want to change the Exercise Motivations such that it's only shown if the participant chooses
Exercise
as their answer to Question ID 1 of Survey ID 18351. We also want the Nutrition Habits to be shown only if the participant chooses Nutrition
as their answer to Q1 of ID 18351.To do so, open the Exercise Motivations survey, find the triggering logic for it, and click on the Edit icon on the right side of the triggering logic. In the
User Triggering Logic
the dialog that opens, click on Edit
and set the criteria to Q18351_1 == 1
(Note that the IDs will be different for your example).
Criteria for the Exercise Motivation survey
This means the triggering logic should be enabled and accordingly the survey will be prompted to the participants, only if the participant chooses Answer ID 1 (i.e.
Exercise
) as part of their response to Question ID 1 of Survey Activity ID 18351.Save the change to the triggering logic, then save and publish the survey, and navigate back to the Activities list. Then follow the same steps for the Nutrition Habits survey, and set the criteria for its triggering logic to
Q18351_1 == 2
.
Criteria for the Nutrition Habits survey
Save the changes to the Nutrition Habits survey. Now we are done with the changes, we can check out the changes to our study.
Let's check the participant's experience of the changes we made above. Switch back to the app where you had logged in as a participant. You should see that the button for
Exercise Motivation
is removed and a new button is added that is called Select Your Survey
.
Ethica app shows the Select Your Survey button
If you do not see these, it might be because the study settings are not reloaded on your phone just yet. To force-reload, the settings, open the app, go to Settings -> My Studies, and tap on Reload Studies from Server.
Here you can see that none of the buttons for the Exercise or Nutrition surveys are shown. That's because, as a participant, we have not answered the Survey Selector question. Therefore, Ethica finds no answer to Question ID 1 of Survey ID 18351 and evaluates the criteria to
False
. Click on the "Select Your Survey" button and choose one or both of the presented options. Here we are choosing both "Exercise" and "Nutrition". Press Submit
to save the survey and return to the app's home screen. Depending on your response, different surveys are shown on the home screen.
Ethica app shows both the Exercise and the Nutrition button
That's because we chose both options, and therefore both
Q18351_1 == 1
and Q18351_1 == 2
were evaluated to True
. You can click on the Select Your Survey
button as many times as you like, and change your options. Your option is immediately applied to the home screen of the app.In the above example, we used the criteria on a triggering logic of type User. This helped us to see immediately how the criteria work in action. You can use criteria on many other components. For example, if you put criteria on a survey section, Ethica evaluates the criteria immediately before presenting that section to the participant and depending on the result of the evaluation, it either skips the whole section or shows the section to the participant. Similarly, you can put criteria on a single question to present or skip that question.
Another useful use of the criteria is Time Triggering Logic. This defines if Ethica should present a survey or not and if yes when the survey should be presented.
Last modified 5d ago