# Best way to skip an inner loop?

**URL:** <https://discourse.psychopy.org/t/best-way-to-skip-an-inner-loop/37997>\
**Category:** Online experiments\
**Created:** [December 22, 2023, 1:32am UTC](https://discourse.psychopy.org/t/best-way-to-skip-an-inner-loop/37997 "2023-12-22T01:32:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matiasfduque](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@matiasfduque](https://discourse.psychopy.org/u/matiasfduque)\
**Post date:** [December 22, 2023, 1:32am UTC](https://discourse.psychopy.org/t/best-way-to-skip-an-inner-loop/37997/1 "2023-12-22T01:32:16Z")

</div>

Description of the problem:

I am using the Builder and I have one big outer loop that only loops twice and several inner loops with trails as below:

[inner loop1] [inner loop2] [inner loop3]

I am struggling to find an easy way to show inner loops 1 and 2 twice (as controlled by the outer loop) and ONLY show the inner loop3 once. What’s the best way to SKIP inner loop 3 if it has already been completed? I know I can use a counter, but that still adds two iterations of inner loop 3 to my data file.

Apologies if this is a really straightforward answer (I suspect it is). But I’ve been poking around and haven’t been able to implement an easy solution…

Thanks in advance!

---

<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:** [December 22, 2023, 7:58am UTC](https://discourse.psychopy.org/t/best-way-to-skip-an-inner-loop/37997/2 "2023-12-22T07:58:48Z")

</div>

You could point the outer loop at a spreadsheet with two columns called Twice (containing 1 1) and Once (containing 1 0) and use $Twice for the nReps for your first two inner loops and $Once for the third.

Offhand I can’t remember if the $ is necessary.
