I have been experimenting with Pavlovia in piloting mode (so I can’t provide a URL) and have found that the values of variables set in the final block or trial of a loop are not saved to the .csv results file unless the loop contains a response component. PsychoPy reports these values regardless of whether a response component is present.
In the example program attached, there is a loop of 3 trials nested inside a loop of 3 blocks. The conditions file for the trial loop contains a variable called ‘trialNo’ and the conditions file for the block loop contains a variable called ‘blockNo’. There is a keyboard component in every routine.
When all the keyboard components are disabled, the results file reports the values of ‘trialNo’ for just the first two trials and the values of ‘blockNo’ for just the first 2 blocks.
When a keyboard component inside the trial loop is enabled, the results file reports the values of ‘trialNo’ for all three trials. It doesn’t matter which routine in the trial loop contains the enabled keyboard component.
When a keyboard component inside the block loop is enabled, the results file reports the values of ‘blockNo’ for all three trials. But this only works if the enabled keyboard component is in a routine located after the nested trial loop, not in a routine located before it.
By setting the duration of the keyboard components to zero, they can be made unobtrusive, i.e. their presence does not affect the experiment. But this is a pretty clumsy workaround. There must be something that I’m missing…
Last rep missing (keyboard components disabled):
Last rep showing (keyboard components enabled for both block and trial):
dataSaveTest.psyexp (18.4 KB)
blockConds.xlsx (8.5 KB)
trialConds.xlsx (8.4 KB)