Use a dataset in a MicroFlow

1
Hi, can someone advice me on the next issue. I have a SQL statement which retrieves the data I need. However this is SQL and cannot be used in Mendix directly, right? So I was wondering if it is possible to create a dataset which wil be filled using the mentioned SQL. first I have to convert it to OQL to fill the my dataset, I know that. After I filled my dataset I would like to use the dataset to fill an entity in my application. So I thought of a microflow to fill this entity, based on the dataset. Is it possible to use a dataset in a microflow? If not maybe it is a good request for change/ new feature? Can someone tell me if this is possible and if so, how to accomplise this.
asked
3 answers
2

Mendix (OQL) datasets and the other reporting functionality cannot be used in microflows (or in data views/grids), so what you're describing is not possible.

You could create a Java action to execute the OQL query (using Core.retrieveOQLDataTable(...)) and use the result to fill your entity. Another possibility might be rewriting your SQL query to XPath so you can achieve the same result by using a microflow retrieve action, but not every SQL query can be expressed using XPath.

answered
0

Thanks for the support. I still have to find my way round in Mendix.

answered
0

If the data is in another database use Webservices to publish it. Let Mendix consume.

Or define the SQL as view and use Database Replicator (AppStore) to get the data in Mendix. This is probably the best way around.

Only start writing Java if you are absolutely sure there is no alternative!

answered