Selecting condition file based on participant number

I am doing a two-session experiment. However, the stimuli that participants see during session 2 depends on what stimuli they saw during session 1. I am having trouble finding a way to show a particular set of stimuli based on the participant ID.

Participants will be randomly assigned a condition in Session 1. I am trying to find a way where I could look up the condition they were assigned in Session 1 to show them the corresponding file for Session 2. My only half idea is to create an excel file with participant IDs and conditions, but I don’t really even know what I would do with that. Participant IDs will be pulled from MTurk, so they will be alphanumeric.

Is this online or local? Online, this is a good use case for the Pavlovia Shelf.