In experience sampling or longitudinal studies, researchers often want to show or hide questions based on how a participant answered earlier in the same session.
By default, Avicenna looks at all sessions (including past ones) to find the last existing response submitted by a participant. If a question is skipped or hidden in the current session, Avicenna might “look back” to previous sessions and use an old answer to evaluate your criteria. This guide explains how to ensure your logic only considers the current session.
The Situation
You are running a **Daily Mood Check-in survey.
- Q1 asks: “Do you feel overwhelmed?” (Yes/No).
- Q2 (shown only if
Q1 == Yes) asks: “Rate your stress level (1-10).” - Q3 (shown only if
Q2 > 5) asks: “Do you want to contact support?”
The Problem:
Yesterday, the participant answered “Yes” to Q1 and “8” to Q2.
Today, the participant answers “No” to Q1. Consequently, Q2 is hidden (not asked). However, Avicenna might still see the “8” from yesterday’s Q2 and incorrectly show Q3 today.
What to Do?
To prevent this, you must “chain” your conditions so that a dependent question only appears if the entire path leading to it is true in the current session.
-
Identify your current logic setup.
Currently, the criteria for Q3 might look like this:Q2 > 5Because Q2 is hidden today, Avicenna looks for the last valid response to Q2, which was “8” from yesterday.
-
Update dependent question criteria to include the full condition chain.
You need to explicitly tell Avicenna that Q3 should only appear if Q1 was also answered in a specific way today.Change Q3’s criteria to:
Q1 == 1 AND Q2 > 5(Assuming answer ID 1 is “Yes”)
This ensures Q3 only appears if Q2 was actually shown and answered in the current session.
-
Make the “Root” question Mandatory.
Ensure that Q1 (the first question in the chain) is set to Mandatory and is always visible to the participant.
This is essential because Avicenna needs a guaranteed fresh response in the current session to start the logic chain. -
Apply the same pattern to deeper dependencies.
If you have a Q4 that depends on Q3, you must chain all previous conditions:Q1 == 1 AND Q2 > 5 AND Q3 == 1You can also use parentheses for clarity:
(Q1 == 1) AND (Q2 > 5) AND (Q3 == 1) -
Preview and test your flow.
- Join the study as a test participant.
- Submit a session where you answer the questions to trigger all follow-ups.
- Start a new session and answer “No” to the first question.
- Verify that none of the dependent questions from the previous session appear.
Pro Tip
If you have many questions dependent on one specific answer (e.g., 10 questions that should only show if Q1 == Yes), you do not need to add the chain to every single question.
Instead, move all those dependent questions into a Section, and apply the criteria Q1 == 1 to the Section itself. This makes managing your survey flow much cleaner and easier.

