Query based dropdown list stalling at time of setup

Hi, I am trying to set up a query based dropdown list and am using the following code as a test run to make sure the dropdown list works:

select count(distinct s.id)
from shipment s
join company c
on s.company_id = c.id
where c.name = '{{customer name}}'

The base query works (without the where clause). With the where clause, the widget pops up with the default text box with the heading of “customer name”.

The problem is when I go to select “Query based dropdown list” using the following parameters:
Screen Shot 2021-09-27 at 5.06.53 PM

When I select those parameters and click “ok”, this happens:
Screen Shot 2021-09-27 at 5.07.35 PM

And the query based dropdown list just never loads. I’m not sure how to address this given that there’s no error thrown or anything, it just spins eternally in a spinning wheel of death. Anyone run into this before/have any advice on how to deal with it? Thanks in advance.

Sorry for my delay.

How many results does your customer query return?

Do you see any errors in your browser console when it spins?

Hi @jesse, I am also facing similar issue. For me the query based dropdown gets loaded, but there is a lot of latency and is very slow. It takes around 15-20 sec for the dropdown to show and the page gets stuck at times. I assume this could be because the results of the query based parameter is huge so loading it in the browser(as the dropdown is clicked) is taking time. Is there a way I can show only few values in the dropdown, but when the user enters few letters, the respective result can be showed(kind of autocomplete suggestion). Or is there any other solution, would be helpul.

Your analysis sounds correct to me. Some code changes are necessary to facilitate streaming these values as the user types, although that would be ideal. I’m happy to collaborate on implementing this with the community if someone is interested to take on this effort.