Setting Default Value in Drop Down to Parameter Passed From URL

I have a drop down that pulls its list of options from a Data Type called “Department” which simply lists some department names.
image

Here is the configuration:

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

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.

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

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

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

image

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