psychopy.org | Reference | Downloads | Github

Show current and next value in condition loop

Hello!
I am trying to show two sentences at the same time on a screen within a conditions loop. My conditions file contains 80 sentences which form a story and their corresponding sentence number in the story, and I would like to show the sentence corresponding to the current trial and the sentence corresponding to the next trial at the same time. The task forms a chain of sentences, where the first sentence of a trial corresponds to the last sentence of the trial before.
I cannot hard-code the sentences, because we want the order of sentences to be in a random order. I have looked into the Coder to understand the loops but I have not yet been able to find a solution from there. I hope this community can give me some pointers on how to best handle this situation, and whether it may be easier to make a custom for-loop within the coder-view (and import xslx-file also within the coder view).

Thanks in advance!

It should easy to copy the current sentence to a new variable and then show the current and previous sentence