# Setting dynamic choice for dropdown

**URL:** <https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052>\
**Category:** Database\
**Created:** [October 14, 2017, 8:26pm UTC](https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052 "2017-10-14T20:26:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![topherwilliams](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/topherwilliams/32/9504_2.png) [@topherwilliams](https://forum.bubble.io/u/topherwilliams)\
**Post date:** [October 14, 2017, 8:26pm UTC](https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052/1 "2017-10-14T20:26:23Z")

</div>

Hey - I’m trying to build a simple app for a friend that runs a drum studio. The app texts students and asks if they’re practiced every day and logs the data.

When a student signs up, they need to select who their teacher is.

Users are comprised of both teachers and students.

If someone signs up as a student, I need to create a drop down then allows them to select their teacher. However, I’m running into an issue in that I can select the proper “choice sources”.

Here’s the current selection

 ![05 PM](https://us1.discourse-cdn.com/bubble/original/3X/b/d/bdad04d9b46dce3a2ce5bcd96c89d1e03f1c42ec.png)

The edit link is here: [practicebuddy | Bubble Editor](https://bubble.io/page?type=custom&name=Signup%20%2F%20Login%20Popup&id=practicebuddy&tab=tabs-1)

Any idea what I’m missing?

I can’t seem to configure the “choice sources” in a way that it will display a list of the names of all of the teacher.

The dynamic text needs to show the Names of all users that are “type = teacher”

---

<div class="post-metadata">

**Author:** ![andrewgassen](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/andrewgassen/32/44248_2.png) [@andrewgassen](https://forum.bubble.io/u/andrewgassen)\
**Post date:** [October 14, 2017, 8:36pm UTC](https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052/2 "2017-10-14T20:36:09Z")

</div>

In Choices Source, just use the “Search for Users” with the constraint of “Type = Teacher” that you already set. Then, in “Option Caption,” that’s where you’d specify to use the Name field.

Choices Source is looking for a list of choices. The way you’ve built your expression, you are just providing the first item in a list, not the list itself.

---

<div class="post-metadata">

**Author:** ![topherwilliams](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/topherwilliams/32/9504_2.png) [@topherwilliams](https://forum.bubble.io/u/topherwilliams)\
**Post date:** [October 14, 2017, 8:43pm UTC](https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052/3 "2017-10-14T20:43:00Z")

</div>

Awesome. Thanks. That fixed it.

I knew it must have been something simple. For some reason the term “option caption” didn’t make me think it would do that.

---

<div class="post-metadata">

**Author:** ![bentomsouthgate](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@bentomsouthgate](https://forum.bubble.io/u/bentomsouthgate)\
**Post date:** [December 7, 2020, 5:04pm UTC](https://forum.bubble.io/t/setting-dynamic-choice-for-dropdown/19052/4 "2020-12-07T17:04:28Z")

</div>

Hello

Is there a way to pull data just as text from the database?

I have a list of university students and each student has inputted the university they went to.

I want to have a drop-down that pulls a list of the all the universities in the database so when a university is selected in the dropdown, this would trigger a repeating group to just show students from that university?

The repeating group would search for students and have a constraint saying each users “university” must contain the value selected in the drop down?

Thanks,

Ben
