Skipping routines does not work online, but runs perfectly offline

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): MacOs Monterey
PsychoPy version (e.g. 1.84.x): v2021.2.3

What are you trying to achieve?:
I intend to skip one routine within a loop in my trial conditionally on a variable that I defined in my excel file. This variable can either be 1 or 0 (so basically skip vs. don’t skip routine). I am trying to run the experiment online via local debug mode. Here I run into problems. However, running the experiment offline works perfectly fine.

What did you try to make it work?:
I added a customised code component and set the following in the begin routine (and also “Each Frame”) section:
if myVariable == 0:
continueRoutine = False

I tried to play around with the Code Type as well. I have already tried to move my code to the “each Frame” sheet, but this does not change anything.

What specifically went wrong when you tried that?:

It works perfectly offline, however, when I try to run my experiment online, 2 things happen:
The routine is not skipped as expected and the loop seems to be stuck in one row of my excel file that gets shown over and over again. It does not seem to iterate through my excel file.
I am attaching screenshots of my conditions file, my flow and my code component.
I would appreciate your help immensely! Thanks in advance!

I am also attaching a screenshot of my excel conditions file.

Try moving the code to each frame and force the number to be converted to a string. Sometimes this is safe way to prevent Javascript from comparing 0 == “0”.

if str(adjust2Present) == "0":
   continueRoutine = False

Hi Luke.
Thank you very much for your help. I think it works now. I implemented a loop around my routine that I want to conditionally skip, that worked. I also followed your advice of converting the numbers to strings. Moving the code to each frame did unfortunately not work, although I have read this being the solution to my problem often before.
Anyways. Thank you very much!