Embed a contingent survey within a loop?

Hi

I am running an experiment in which I want participants to complete a survey after a certain number of trials have passed in a loop (essentially the halfway point). Is there a way to make a survey component contingent upon the trial number? I know how to do this with a routine, but there do not seem to be options for surveys. I do not want to split the loop because I want to randomize the trial order. Is there perhaps a way to insert the survey using in the trial routine that is inside the loop if thisTrialN is a certain number?

Thanks for any suggestions!

Put an additional loop around the survey routine with nReps set to a variable which is 0 for most loops of the other routine and 1 for the critical loop.

1 Like

I was wondering if a nested loop might help me out - nice hack - thanks!