Run only one row a time in a loop

OS (e.g. Win10): Mac
PsychoPy version (e.g. 1.84.x): 2022.2.5

I hope that every time run the loop, it only runs 1 row sequentially, and it would run the loop three times in total.

In the condition file of the inner loop(loop_prac_4), there are 3 rows in total.
Currently, there is an outer loop(trials_prac) that controls whether the inner loop is executed.

Now every time it is executed, 3 rows will be run.

Thanks for help!

Hi there, I’m just going to make sure I understand correctly: Currently, there are three trials/rows in the condition file for loop_prac_4 and you would like the experiment to execute prac_none, prac_low, prac_high and then the contents of the loop “prac_4”, but only for the first row. Then, you would like it to repeat prac_none, prac_low, prac_high and run the second row of loop_prac_4, and so on, correct?

Is there a reason why you don’t just remove the loop “loop_prac_4” and store the information about the trials in each outer loop iteration in the conditions file that is linked to the outer loop? You said that this file currently controls whether the inner loop (I’m assuming that’s loop_prac_4) is executed. You could maybe just add columns to each row of that outer loop conditions file and add information about the contents of “que_1” and “prac_rating”, if it is executed at all. When it’s not executed, these columns could be empty.

Hello!
Sorry for not explaining clearly.
It would be prac_none, loop prac_4 for first row, prac_low, loop prac_4 for second row, prac_high, loop prac_4 for third row.

Outer loop controls inner loop means whether the trial in each loop would be executed.
Here is the screenshot of the condition file of loop “trials_prac”.

nRepsTask1 refers to the nReps of loop_prac_1, and so on.

Ah okay, thanks for clarifying! That makes sense. My original point still stands, why not just copy the columns from your loop_prac_4-conditions file into the the trials_prac conditions file and remove the loop “prac_4”? Since you’re executing it every time anyways and it’s only supposed to run one time.

If that doesn’t make sense to you, could you maybe post a sceenshot of the conditions file for loop_prac_4 and explain what type of routines “que_1” and “prac_rating” are?

Ohh, I just understand what you mean, I think 'loop_prac_4" can be removed, and add the columns into the file of "trial_prac"and I tried to do that, but both routines (“que_1” and “prac_rating”) didn’t show up when I execute the experiment, besides, there is no error message…