# Default Value of Dropdown from URL Parameter

**URL:** <https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674>\
**Category:** Need help\
**Created:** [May 20, 2023, 1:51pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674 "2023-05-20T13:51:51Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 1:51pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/1 "2023-05-20T13:51:51Z")

</div>

Hello everyone…

I’m trying to preselect a _Dropdown value_ from the **URL Get Parameter** , but I don’t know why it won’t work.

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

I also tried with the condition…

![image](https://us1.discourse-cdn.com/bubble/original/3X/6/2/6216e470296fb233838404fad6ff5a0360b5e7b1.png)

Still, it won’t select anything… I tried with the **Option Set** as a _type_ and also with **Data Type** as a _type_

Anyone any idea how to do this?

Thanks  
Fabian

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 20, 2023, 1:54pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/2 "2023-05-20T13:54:47Z")

</div>

what do you set in the url parameter? the “name” or the unique ID? (if this is a data type).

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [May 20, 2023, 1:56pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/3 "2023-05-20T13:56:53Z")

</div>

Hi there, @fabian.banushi… the issue is that the parameter in the URL is not a thing in your `Location-City` data type. So, in the _Default value_ field, you likely need to do a search and get the first item from the `Location-City` data type where a field in that data type is equal to the value in the URL parameter.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 20, 2023, 1:58pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/4 "2023-05-20T13:58:34Z")

</div>

However, if you use unique ID… this is a thing and this can be used directly (and better to be used with the WU) instead of doing a search for

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:01pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/5 "2023-05-20T14:01:06Z")

</div>

It’s a name of a city

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:01pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/6 "2023-05-20T14:01:28Z")

</div>

So for every thing I have to do search for?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 20, 2023, 2:01pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/7 "2023-05-20T14:01:32Z")

</div>

So you need to use do a search. If you can replace it by the unique ID, you will avoid to use do a search

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [May 20, 2023, 2:02pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/8 "2023-05-20T14:02:52Z")

</div>

Oh, wait… is that true, @Jici? I’m sure it is if you are saying it, but I thought even if the URL parameter is a unique ID, you still have to do a search for a thing with that ID. Huh, learn something new every day, eh? (I’m not sure why I didn’t know that already, though.)

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:02pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/9 "2023-05-20T14:02:58Z")

</div>

How do you suggest with unique ID? How is the “expression”?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 20, 2023, 2:05pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/10 "2023-05-20T14:05:08Z")

</div>

@mikeloc Absolutely no. If you set the unique id, let’s say param=12345678x12345678 and set the Get data from url “type” to the DB “type” (like @fabian.banushi did in the first screenshot), this will return the specific item set in the url parameters  
@fabian.banushi just do like in your first screenshot, but instead of setting the name in url, set the unique\_id

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:13pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/11 "2023-05-20T14:13:02Z")

</div>

Yeah, it works with Unique ID… What about the other method? Do I have to do search for and then first item?

How about when it is Multidropdown?

Thanks

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:17pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/12 "2023-05-20T14:17:00Z")

</div>

What about for performance? Which is more faster?

---

<div class="post-metadata">

**Author:** ![Jici](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jici/32/30722_2.png) [@Jici](https://forum.bubble.io/u/Jici)\
**Post date:** [May 20, 2023, 2:22pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/13 "2023-05-20T14:22:50Z")

</div>

unique id in url is faster and consume lest WU. From what I know, url parameters doesn’t handle list (in this case, a search is needed). For multidropdown (list), you may consider using cookies instead if you don’t want to store in DB

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 2:25pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/14 "2023-05-20T14:25:48Z")

</div>

> [@Jici](#):
>
> For multidropdown (list), you may consider using cookies instead if you don’t want to store in DB

I never used cookies before… How to do that? Can you reference a topic in the forum or an article?

Thanks again  
Fabian

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 8:20pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/15 "2023-05-20T20:20:02Z")

</div>

What about a list of items? How can I send with URL Parameter to the next page? I’m trying to use Custom States also but it doesn’t work.

I mean I can send the parameters but I don’t know how to put them in Custom States (from page load)

Thanks again  
Fabian

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [May 20, 2023, 9:06pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/16 "2023-05-20T21:06:56Z")

</div>

Also you can store a list of unique IDs separated by a `-` or something, and on the next page split it back into a list and use Floppy Rehydrator to turn them into Things

Nvm though maybe a search would just be easier.

---

<div class="post-metadata">

**Author:** ![fabian.banushi](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/fabian.banushi/32/135641_2.png) [@fabian.banushi](https://forum.bubble.io/u/fabian.banushi)\
**Post date:** [May 20, 2023, 9:10pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/17 "2023-05-20T21:10:46Z")

</div>

Can you give a little more detail, please?

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [May 20, 2023, 9:47pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/18 "2023-05-20T21:47:47Z")

</div>

> [@List of Items in Custom State from URL Parameter](http://forum.bubble.io/t/list-of-items-in-custom-state-from-url-parameter/263721/2):
>
> [list of things]:each item's unique id:joined with "-" Then on the new page Do a search for [the datatype] with the constraint unique id is in [your URL parameter]:split by "-"

---

<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:** [July 29, 2023, 1:52pm UTC](https://forum.bubble.io/t/default-value-of-dropdown-from-url-parameter/263674/19 "2023-07-29T13:52:12Z")

</div>

Closed on July 29, 2023, 1:52pm UTC

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