Skip to main content

Have a 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.

note

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.

Part 1: Assign a Code to Each Participant & Ask the Code Upon Enrollment

  1. Create a Baseline Survey for your study (explained here). This survey will be prompted immediately after the participant enrolls in your study.
  2. Add a Number question to your Baseline Survey with the following content: Please enter the code provided to you by the researcher.

Baseline Survey

  1. Save and Publish your Baseline Survey.

Part 2: Enable Triggering Logic Only for Participants with the Desired Code

  1. Open Survey A for editing.
  2. From the top right, click on the Triggering Logics.
  3. Select the triggering logic type you want to set for the participant.
  4. Click Edit to open the Edit triggering logic dialog.

Triggering_Logic

  1. In the TL dialog editor, on the right side of Criteria, click Set.
  2. In the Criteria Editor dialog, click on Add Condition
  3. In the Search Question, find the question you created in Step #2 above.
note

If your Baseline Survey is not published, you will not see the questions here.

  1. For the operator, choose ==
  2. For the right operand, enter the desired code.

Setting_Criteria_for_Baseline_Survey

  1. Press Save on the Add Condition dialog. You should see the criteria on the triggering logic like Q22701_1 == 321.
  2. Press Save on the triggering logic

Triggering_Logic_Editor

  1. Save and Publish Survey A.

Part 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 enter 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.

info

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.

note

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.

Part 1: Create a Survey to Store Participant-Specific Variables

  1. 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.
  2. Remove all triggering logics for this survey, so participants will not see this survey.
  3. Add a Number question to this survey, with the following content: Please enter the participant's code:
  4. Save and Publish Survey B.

Part 2: Enable Triggering Logic Only for Participants with Desired Code

Note that this section is exactly like Part 2 of the Method One. The only difference is that instead of referencing the question from the Baseline Survey, you will reference the question from Survey B.

Part 3: Enroll Participant, Enter Their Code, and Reload Their App

  1. Enroll participant in your study. At this stage, because there is no code for him/her yet, the triggering logic will be disabled.
  2. Navigate to the Activity Sessions page and press the Submit New Session button. Submit_New_Session_Location
  3. In the Submit New Session dialog, select Survey B and the participant you want the triggering logic to be enabled for. Activity_Session_Setting_For_One_Triggering_Logic
  4. Press Next
  5. In the next page, enter the code for the participant. Completed_Researcher_Responded_Survey
  6. Press Submit
  7. 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.
  8. Find the participant.
  9. From the top right corner, or directly from the tree dot menu next to each 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.