# Setting Default Value in Drop Down to Parameter Passed From URL

**URL:** <https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732>\
**Category:** Need help\
**Created:** [October 30, 2023, 6:36pm UTC](https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732 "2023-10-30T18:36:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryan5](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bryan5/32/192757_2.png) [@bryan5](https://forum.bubble.io/u/bryan5)\
**Post date:** [October 30, 2023, 6:36pm UTC](https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732/1 "2023-10-30T18:36:28Z")

</div>

I have a drop down that pulls its list of options from a Data Type called “Department” which simply lists some department names.  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/0/10f867c4f8bd19f125940d76baa5f0a8d9f886ae.png)

Here is the configuration:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/1/f/1f40f35a579b824e16d56352e8264babefe55737.png)

I know want to set the initial value of the drop down selection to a department name passed via a URL as text from another page.

Here, in this example, I passed a value called “PR” from another page. It is showing up as text in the debugging text box I added.

![image](https://us1.discourse-cdn.com/bubble/original/3X/4/1/410fcef83fe0003b40cc43dac9bba96e09dbced6.png)

I can’t figure out how to use this value to make the default value of my drop down box equal to this passed parameter value.

In the shot below, you see I am setting the dept\_name to the dept parameter which is text that is passed from the other page.

I think I am missing something basic here.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/0/7/070a91ad37ca4044a5a1a1df4872f4ddc35bfb61.png)

---

<div class="post-metadata">

**Author:** ![code-escapee](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/code-escapee/32/195485_2.png) [@code-escapee](https://forum.bubble.io/u/code-escapee)\
**Post date:** [October 30, 2023, 6:45pm UTC](https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732/2 "2023-10-30T18:45:51Z")

</div>

Add the parameter on the other page when navigating to the page you want the dropdown set on. Then on that page the default value is based on get data from url that matches the option. Make sure querystring keys are consistent and that the value you use are consistent

---

<div class="post-metadata">

**Author:** ![bryan5](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/bryan5/32/192757_2.png) [@bryan5](https://forum.bubble.io/u/bryan5)\
**Post date:** [October 30, 2023, 7:41pm UTC](https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732/3 "2023-10-30T19:41:52Z")

</div>

Okay thanks! Your suggestion had me go back and look at why the syntax above wasn’t working. Bubble actually showed the answer. The default value I was asking for was returning a "list of departments for a default value which bubble doesn’t allow and doesn’t make sense.

![image](https://us1.discourse-cdn.com/bubble/original/3X/3/e/3e639cfa37df4cc7b21208e70023d109970d41a8.png)

So somewhere else I saw where people then added :first item after the query and it works perfectly.

![image](https://us1.discourse-cdn.com/bubble/original/3X/c/a/cac2e31096d821172a591b94ff5e166f2c11bc09.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [January 8, 2024, 6:37pm UTC](https://forum.bubble.io/t/setting-default-value-in-drop-down-to-parameter-passed-from-url/290732/4 "2024-01-08T18:37:23Z")

</div>

Closed on January 8, 2024, 6:37pm UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
