I’m new to Mendix and web development. So apologies for the newbie question. I’m trying to retrieve data from my database for reporting via a WebApp based on the criteria selected from the database. I can retrieve and display information from the database on a page using a Data Grid. The Data Grid is fed from a microflow that uses Execute Query to extract the data from the database. That works fine. What I would ideally like to achieve is for a page to display a drop down of possible selections (eg Shop or a Store) extracted from the database. When the user selects a shop from the dropdown another query is executed against the database to bring back the information on the selected shop. I have tried this using a Reference Selector pointing to the entity relationship in the Domain Model but this never seems to populate the dropdown list. From the Home Page Navigation I’ve tried an item that calls a Microflow to extract the Shop/Store information and opens a page only to find I can only pass an object to a page but the Execute Query Widget will only return a list. Is there a way I can pass the results of an execute query result directly to a page? Thanks in advance.
You can build your logic with a NP entity for the selection
and then show it in a page like this
I advice to read some more of the documentation and tutorials to get a better understanding of how that works.
Hello and thank you for your reply.
I did have the reference selector set up similar to how you demonstrated in your reply but pointing to a persistent object instead.
I tried with the non-persistent object too but the result was the same.
I think one of the things I’m having difficulty understanding is how the data is stored within Mendix once the query returns some data. I have seen the query is generated against the database and does produce data but that data doesn’t seem to be available in Mendix outside of the immediate process.
I have tried to make Entity’s persistent and can see they exist when I look in the Mendix built-in Database Viewer but the only entries that exist in there are [null] even though I know the workflow produces data.
I’ve been through the crash course but that deals with a REST service and not a JDBC connection. I’ve not had much help finding any additional help in the documentation. Any further guidance or additional tutorials or documentation pointers would be greatly appreciated.