I am trying to use the script published at the below url to be able to filter the dashboard using java script.
However since the values for the drop down can be dynamic, Is it possible to set up the drop down so that it pulls the values based on a column from Tableau.
Can you extract the data so that you're not querying the database? Just an initial thought -- I have no experience with the JS API, so I do not really understand the question fully, but creating an extract would allow you to query that instead of the live DB you're currently using, at a high level. Are you familiar with Extracts?