Database and visualize

Hi community, I´m new in Mendix. I downloaded the module Database Connector. I would like to be able to display and visualize individual data points of a table. I have several tables in my database and of course I want to be able to do it universally. My problem is I do not understand the connection of the microflow as I should then present it on a page be it a "bar chart", "bubble chart" … My attempts were unsuccessful to represent data points individually. What must the mircoflow look like to be able to display my data points individually on a page, if the query fetches the entire table ? Thanks.    
2 answers

The ExecuteQuery action needs an object from your domain model with attributes that match the column names that are returned by your statement. If you want to do it generic, you will not be able to get the complete tables. You could only retrieve a subset of the table columns (those who are matching with your entity). You can use aliases in your sql statement to make the column names match your entity attribute names. I still think that they need to be the same datatype but I can imagine that it might be possible to build something with it that matches your needs.


Hi Daniel,

I would suggest to split your two issues, because its not clear if you have issues with showing the graph or with retreiving the sql-query data.

First create this SQL_data table and a new/edit page to add rows and manually fill it with some rows.

Then create the page with the barchart / graph with a datasource microflow for the series that returns a list of all the rows in the table.

Once that is solved, you can try to change the datasource microflow in a way that it executes the SQL query to retrieve the data from another source…

Go make it!

Kind regards,