# Dynamic Media based on previous responses in Select One

**URL:** <https://forum.getodk.org/t/dynamic-media-based-on-previous-responses-in-select-one/47485>\
**Category:** Support\
**Tags:** odk-collect, form-design, odk-central\
**Created:** [June 12, 2024, 6:02pm UTC](https://forum.getodk.org/t/dynamic-media-based-on-previous-responses-in-select-one/47485 "2024-06-12T18:02:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Depke](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/tyler_depke/32/17598_2.png) [@Tyler\_Depke](https://forum.getodk.org/u/Tyler_Depke)\
**Post date:** [June 12, 2024, 6:02pm UTC](https://forum.getodk.org/t/dynamic-media-based-on-previous-responses-in-select-one/47485/1 "2024-06-12T18:02:54Z")

</div>

**1. What is the issue? Please be detailed.**

I have a series of 4 select one questions. The 4th select one question shows 3 responses, each of which are whatever was chosen in the first 3 select one questions. The first 3 select one question's responses all have audio attached in the audio::English column. I've successfully been able to get the Choice Names to show up in Question 4 as responses, but I would like to have the audio show up as well. The closest I've gotten is with the attached XLSForm. When tapping the audio button that shows up for response 1 on question 4, it fails to load and shows a really long path that I cannot get a screenshot of unfortunately. On a positive note, in the current configuration, the final file name changes dynamically with what the user previously selected.

**2. What steps can we take to reproduce this issue?**

Open ODK Collect with the attached XLSForm and proceed to question 4. On question 4, notice only the first response has an audio button. Press that audio button.

**3. What have you tried to fix the issue?**

In the survey tab, the calc\_qa1 (row 5) I tried putting a number of different things in the calculation column. Things like:

jr://audio/${select\_one\_q1}

but they all have failed to validate when uploading to Central.

@ahblake seems to have explained something similar here [Dynamic images loaded to an image widget from a choice/CSV selection - #5 by ahblake](https://forum.getodk.org/t/dynamic-images-loaded-to-an-image-widget-from-a-choice-csv-selection/41921/5) but with images and it doesn't seem to be the exact same situation as I'm wanting this as responses to a select one question

**4. Upload any forms or screenshots you can share publicly below.**

[FFF.xlsx](https://forum.getodk.org/uploads/short-url/l6Vy3u7tESgrttgkoEoyVoHUh0K.xlsx) (45.7 KB)

---

<div class="post-metadata">

**Author:** ![Sadiq\_Khoja](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/sadiq_khoja/32/3719_2.png) [@Sadiq\_Khoja](https://forum.getodk.org/u/Sadiq_Khoja)\
**Post date:** [June 17, 2024, 2:40pm UTC](https://forum.getodk.org/t/dynamic-media-based-on-previous-responses-in-select-one/47485/2 "2024-06-17T14:40:23Z")

</div>

Hi Tyler,

One way to solve the problem at hand is to replicate the choices of q1, q2 and q3 into q4 and use `choice_filter` column to show only selected choices from previous questions. For this particular problem you can use following expression to filter the choices: `name = ${select_one_q1} or name = ${select_one_q2} or name = ${select_one_q3}`

I have updated the XLSX form with the changes. Hope this answers your question.

[FFF.xlsx](https://forum.getodk.org/uploads/short-url/353aFjWUNE95aBMr0ZYxwUQDr7C.xlsx) (46.1 KB)
