Dropdown

Hi,

I’m creating a dropdown menu which filters a job database. The dropdown menu filters the job locations (see below). I’ve finally got everything working, although I would like to add an ‘all locations’ option in the dropdown menu which when selected shows all the locations jobs are available. So far the dropdown menu is linked to my locations column in my database so the graph doesn’t show any results when ‘all locations’ is selected.

How could I achieve this? Any help would be really appreciated! (I hope my question makes sense!)

Thanks in advance!

1 Like

You can add an option to the Dropdown using the below code.

let opts = $w("#myDropdown").options; 
opts.push({label: "New item", value: "new item"}); 
$w("#myDropdown").options = opts;

To handle the action you must code something, add an event onChange in the properties panel and then if the value selected is “All Locations” do a query or what you need, if not filter on the selected value.