Enable Triggering Logic Only for One Participant
Assume you have a survey in your study, Survey A
, with one triggering logic.
Your study also has 10 participants. You want the triggering logic to be enabled
for Participant number 2 and be disabled for all other 9 participants.
Here we explain how to enable a triggering logic for one specific participant, but you can apply the same concept for any subset of participants. This same concept also applies to enabling a survey or any other activity type in Avicenna.
There are two ways to do so. Below we explain each method.
Method One: Asking Participants to Enter a Code.
In this method, the idea is you share a random code with each participant (e.g.
321
), ask participants to enter their code when they join the study, and
enable the triggering logic for participants with the desired code.
1. Assign a Code to Each Participant & Ask for Code Upon Enrollment
- Create a Baseline Survey for your study (explained here). This survey will be prompted immediately after the participant enrolls in your study.
- Add a Number question to your Baseline Survey with the following content:
Please enter the code provided to you by the researcher.
Save
andPublish
your Baseline Survey.
2. Enable Triggering Logic Only for Participants with the Desired Code
- Open
Survey A
for editing. - From the top right, click on the
Triggering Logics
. - Select the triggering logic type you want to set for the participant.
- Click
Edit
to open the triggering logic in edit mode.
- In the TL editor, on the right side of
Criteria
, clickSet
. - In the Criteria Editor dialog, click on
Add Condition
. - In the
Search Question
, find the question you created in step #2 above.
If your Baseline Survey is not published, you will not see the questions here.
- For the operator, choose
==
. - For the right operand, enter the desired code.
- Press
Save
on theAdd Condition
dialog. You should see the criteria on the triggering logic likeQ22701_1 == 321
. - Press
Save
on the triggering logic.
Save
andPublish
Survey A.
3. Enroll Participants and Monitor for the Desired Behaviour
After making the above changes, when the participant joins, they will be asked to enter the code provided by the researcher. When the participant enters the code, the triggering logic will be enabled for them.
The triggering logic will be disabled if the participant has not entered any code, or has entered a different code.
Instead of a Number question, you may choose a Single Answer question as well. This reduces the chance of participants entering an incorrect code. Note that this method relies on participants correctly entering the code shared with them. You can also monitor their responses to the Baseline Survey to ensure they have not made a mistake.
Avicenna loads the entire study for all participants. If you enroll many participants and create personalized surveys or triggering logic for each of them, this will increase the size of your study and slow down the study loading time in the app.
Method Two: You Enter the Code For Each Participant
The idea in this method is that instead of asking participants to enter the code, as we did in Method One, you can enter the code yourself. This prevents potential errors from the participant and reduces their burden.
1. Create a Survey to Store Participant-Specific Variables
- Create a new survey in your study. Let's call this
Survey B
. This will be used to store variables for enabling and disabling our triggering logic. - Remove all triggering logics for this survey, so participants will not see this survey.
- Add a Number question to this survey, with the following content:
Please enter the participant's code:
Save
andPublish
Survey B.
2. Enable Triggering Logic Only for Participants with the Desired Code
This section is exactly like the second part of Method One. The only difference is that instead of referencing the question from the Baseline Survey, you will reference the question from Survey B.
3. Enroll Participant, Enter Their Code, and Reload Their App
- Enroll the participant in your study. At this stage, because there is no code for him/her yet, the triggering logic will be disabled.
- Navigate to the
Activity Sessions
page and press theSubmit New Session
button. - In the
Submit New Session
dialog, selectSurvey B
and the participant you want the triggering logic to be enabled for. - Press
Next
. - On the next page, enter the code for the participant.
- Press
Submit
. - Now that you have entered the code for this participant, you should reload
his/her phone to get the latest changes. To do so, go to the
Participation
page. - Find the participant.
- From the tree dot menu next to the participant row, press
Reload Devices
.
At this point, the intended triggering logic should be enabled for the specified participant and it should be disabled for all other participants.
You can define a
Notification Template
for Participant Joined
events. This way, you will be informed when a
participant joins the study and you can enter the code for them immediately.