Randomise blocks and then the stimuli inside

Hello! I am new to PsychoPy but love using the program!

I am looking for help when it comes to randomizing experimental blocks and the stimuli contained within each block. I study perception of music repetition and my experiment has 9 blocks, each containing 18 stimuli (block1 is the only one that has 24 instead). What I am trying to achieve is that each participants gets assigned a single block at random, an then all the stimuli in said block are randomly presented to the participant to listen. After listening to each stimulus in the block, they have to rate how much they liked it, then proceed to the next.

What I tried to do is create a loop that loads the blocks and assigns them and then a loop that randomizes the stimuli inside. However, by doing so, the participant gets exposed to all the blocks in a random order, not a singe block. I am scratching my head on what do to with the Builder as I do not know Python that well in order to create my own code.

Is there a way to achieve this in Builder? I’ve attached some screenshots of the routine. Many thanks in advance!

Routine:
image

Root folder of experiment. The block_randomize Excel contains all the names of the block1 to block9 Excel files, while block_stimuli Excel contains the names of the required song stimuli that are placed in the stimuli folder.
image

Audio stimuli loop:
image

Block randomize loop:
image