How to pass values to a query

Hi, I'm just learning Mendix, so please be patient with me if I don't understand some things right away. I have a Employee entity and a Employee Calendar entity. The employee calendar stores the current status of the employee for each month. My task is to create an overview that, when entering a specific month, displays an overview of the employees with the status minus 2 months and plus 2 months. So if the input is May, then the overview should show the status from March to July. For fixed values I have managed this in the form of an OQL query. I have used Data Grid 2 for the display. Now to my question: - How do I realize this for input values? So when a user selects a month in the field, that the value is read and integrated into the query. - How do I adjust the column header? Currently it simply says month1 to month5. Is it possible to pass the parameters of the query to the heading? I hope I have explained my problem in an understandable way. If something is unclear please let me know.   My Domain Model: The data source for the Data Grid: The OQL Query:
1 answers

Make the month an enumeration. Then you can create a microflow that based on the month enumeration to search on use a decision to split the microflow in twelve flows. Since you then know which month you are working with you can do microflow retrieves (or OQL if you must) to retrieve the right data for that month and the month before and after. You can again use the enum to retrieve the right objects.