Populate a Dropdown List with column labels

I have downloaded FactorySQL and FactoryPMI and I am currently evaluating if this is a product for us. Now to my question:

I want the users to be able to select what data to populate a table and a couple of chart objects with. My idea for doing this was to display a dropdown list for every column in the chart where the user could select table columns based on the column names. I am however unable to construct the correct function to achieve this. Can you help me, please?

Database: MySQL

Regards

/T

Ok, let me repeat back to you what it sounds like you’re trying to do to make sure I understand you. You want to dynamically fill in the options of a dropdown box with the names of columns from a table of yours, and then use the selectedStringValue property of the dropdown to construct queries that will drive a table and chart.

This sounds great! Filling in a dropdown with column names dynamically is pretty easy using MySQL: you just query the information schema. You’ll bind your dropdown’s data property to a query that will look something like this:

Just replace mytable and myschema and you should be all set.

Hope this helps,

Carl,

Thank you for your rapid response.
I am duly impressed with the support on a Sunday and everything!

I tried your suggestion and received a number of syntax error messages. After tweaking a bit with the syntax it worked for me. Here is the code that I got working:

SELECT column_name FROM information_schema.columns
WHERE table_schema = ‘myschema’ AND table_name = ‘mygroup’

Can you check if this looks wrong, please. It seems to work, but I am not terribly fluent in SQLish.

Very probably returning here for answers to more questions in the coming week!

Regards

/T

That query looks good to me! And hey - if it works, you know its right!

Let us know when you have more questions,

Carl,

Again, thank you for your support. I will now continue to play with the product.

Regards

/T