# Adding multiple experiment programs to one single pavlovia project

**URL:** <https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402>\
**Category:** Online experiments\
**Created:** [July 31, 2020, 5:06pm UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402 "2020-07-31T17:06:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathacia\_Lucena](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nathacia_lucena/32/9944_2.png) [@Nathacia\_Lucena](https://discourse.psychopy.org/u/Nathacia_Lucena)\
**Post date:** [July 31, 2020, 5:06pm UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402/1 "2020-07-31T17:06:41Z")

</div>

URL of experiment: [https://gitlab.pavlovia.org/NathaciaLR/understanding-input-information.git](https://gitlab.pavlovia.org/NathaciaLR/understanding-input-information.git)

Description of the problem:  
Hi all! I have one experiment design, but 4 experimental lists, and a separate program to each list. I’m a beginner at this, so I can’t figure out how I can add multiple experiments to my platform (in the same project). Each participant should only participate in one of those 4 and not more than this.  
I used the first program designed in the builder as a base for the other 3, so I just saved again with other name, and then changed the .xslx input. But when I was going to sync, psychopy opened that window for me to log the info on the changes of this new version. I was afraid I was going to mess up with the first program already uploaded and perfectly functioning, so I canceled and here I am, asking for advice. Anyone?

---

<div class="post-metadata">

**Author:** ![Nathacia\_Lucena](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nathacia_lucena/32/9944_2.png) [@Nathacia\_Lucena](https://discourse.psychopy.org/u/Nathacia_Lucena)\
**Post date:** [August 18, 2020, 11:25pm UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402/2 "2020-08-18T23:25:26Z")

</div>

up 😰

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [August 18, 2020, 11:52pm UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402/3 "2020-08-18T23:52:02Z")

</div>

Hi,

If I read you correctly, then you should only be using one .psyexp file, with four conditions files. The trick is not to write in explicitly the name of the conditions file in the loop of your file, but instead to use a variable that controls which conditions file is used on a given run of the experiment.

e.g. when running locally, you would add an extra field to the information dialog box that opens at the start of the experiment, labelled, say, `condition_file`, where you would type values like `A`, `B`, `C`, or `D`. Then in the conditions file field of your loop dislodge box, you would enter something like `expInfo['condition_file'] + '.xlsx'`

If run online, I think you can pass parameters like that in the URL to the experiment, and access them the same way, which I think is explained here:

> [@PsychoPy Python to Javascript crib sheet](https://discourse.psychopy.org/t/psychopy-python-to-javascript-crib-sheet/14601):
>
> Many people come to this forum because their experiment works fine locally but doesn’t work online. The reason is that the Python code needs to be translated to Javascript and the auto translate that was added to PsychoPy in January 2020 primarily translates the grammar rather than the individual functions. If you want to run PsychoPy online I highly recommend that you: Write your experiment in Builder using version 2023.1.3 (or later). Study my crib sheet to familiarise yourself with the…

---

<div class="post-metadata">

**Author:** ![Nathacia\_Lucena](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nathacia_lucena/32/9944_2.png) [@Nathacia\_Lucena](https://discourse.psychopy.org/u/Nathacia_Lucena)\
**Post date:** [August 19, 2020, 12:46am UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402/4 "2020-08-19T00:46:04Z")

</div>

Oohh I never thought of doing this way… but, in this case, would only one condition file be ran per experiment or all of them? I distributed my stimuli through lists (versions) using Latin square, generating 4 stimuli lists. I want my participant to be tested with only one of them. Also, would I have control on how many participants would be tested to each list (condition file)?

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [August 19, 2020, 10:09pm UTC](https://discourse.psychopy.org/t/adding-multiple-experiment-programs-to-one-single-pavlovia-project/15402/5 "2020-08-19T22:09:33Z")

</div>

> [@Nathacia\_Lucena](#):
>
> would only one condition file be ran per experiment

Yes, you specify which one of several alternatives will be used on any given run of the experiment.

> [@Nathacia\_Lucena](#):
>
> would I have control on how many participants would be tested to each list (condition file)

Locally, that is quite straightforward, as you can just maintain a list and assign subjects to the appropriate value at the start of each session. Online, I’m not sure how that works - it would be more a function of the recruitment site that you use to send subjects to Pavlovia - I’m guessing they have a way to allocate subjects to groups and modify the URL parameters that get sent to Pavlovia accordingly, but I’m not familiar with those services.
