# Survey Logic Not Working in Preview/Run

**URL:** <https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014>\
**Category:** Pavlovia Surveys\
**Created:** [September 29, 2026, 6:40pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014 "2026-09-29T18:40:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![R\_Huynh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/r_huynh/32/46800_2.png) [@R\_Huynh](https://discourse.psychopy.org/u/R_Huynh)\
**Post date:** [September 29, 2026, 6:40pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014/1 "2026-09-29T18:40:26Z")

</div>

Hello,

I’m having trouble with the logic function in our study. The issue primarily affects the consent form leading into demographic filtering. Specifically, I am trying to filter participants who consent to participate into a demographic filter that further filters their responses based on specific replies (E.g., if they are not a citizen of XXX country).

The preview function shows that the logic function is working, but when I switch it to “pilot” or “run,” the logic no longer works.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/7/c756b668b044763da42267ccc1b123f2b7d1b116.png)

**What did you try to make it work?:**

I tried changing the Pavlovia version when running the survey and using the block function to separate the different pages. However, the block functionality does not work.

**Link to the most relevant existing thread you have found:**

> [@Survey logic problem on pilot](https://discourse.psychopy.org/t/survey-logic-problem-on-pilot/44420):
>
> Hi, everyone, I have a problem with logic in our study where we are combining a survey (#93b1d161-7c1d-43d5-bcf7-c5c65efbf1f9) and experiment in Pavlovia. The problem starts at the consent form. When I run it in Preview the logic works well, but when I pilot it (by itself or in the experiment) the logic doesn’t work, and instead of skipping to the proper section of the survey it just continues to the next page. The skipping logic in other sections appears equally affected. …

**What specifically went wrong when you tried that?:**

The logic still doesn’t work, and the demographic filter page doesn’t appear as an optional page after the user responds to the consent question.

Any help would be appreciated greatly.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [September 29, 2026, 10:50pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014/2 "2026-09-29T22:50:01Z")

</div>

> [@R\_Huynh](#):
>
> I tried changing the Pavlovia version when running the survey and using the block function to separate the different pages. However, the block functionality does not work.

I’m not clear what you tried here. Please could you confirm the names of the filter variables in your data files and the logic you tried?

---

<div class="post-metadata">

**Author:** ![R\_Huynh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/r_huynh/32/46800_2.png) [@R\_Huynh](https://discourse.psychopy.org/u/R_Huynh)\
**Post date:** [September 29, 2026, 11:37pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014/3 "2026-09-29T23:37:10Z")

</div>

Sorry for the confusion.

I am attempting have a logic that makes the second page “Demographic filtering” visible only when a participant responds to the consent page with a particular response.

Logic Attempted:  
If “Consent question 1” equals “Yes, I agree to…” then make the page “Demographic filtering” Visible.

I later set up further visibility logics for if participants who answered the “demographic filtering page” in a particular way to continue the survey.

Note\* If this doesn’t make sense I can try to explain it once again.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [September 30, 2026, 1:52pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014/4 "2026-09-30T13:52:35Z")

</div>

It seems to work for me. My logic page says:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/0/c094b283e81029044d5c9be987ae5a3e2dfa36a4.png)

The actual code is

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/3/63937c55ef0544ffb87c48162c4970b8a5bb1186.png)

I’ve just checked and this also works with:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/8/3/838ffc16b9aad7b2840b9833bfd2e216c38d6ccb.png)

**Try it**

> **[Pavlovia Survey 2026.2.0](https://run.pavlovia.org/pavlovia/survey-2026.2.0/?surveyId=490c4cf7-1e8b-4dad-8723-a00619c96fe3)**

---

<div class="post-metadata">

**Author:** ![R\_Huynh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/r_huynh/32/46800_2.png) [@R\_Huynh](https://discourse.psychopy.org/u/R_Huynh)\
**Post date:** [September 30, 2026, 10:40pm UTC](https://discourse.psychopy.org/t/survey-logic-not-working-in-preview-run/48014/5 "2026-09-30T22:40:28Z")

</div>

Update:

I tried re-entering the entire survey in a new created survey and it worked! There may have been a line of code that was making the logic not work previously, but the logic now works.

Thank you for the help!
