Select form with microflow as source

This is again one of those catch 22 things. I have a dropdown selector with a microflow as source. Since the list of persons to select is still large (more then the dropdown can handle) this is not ideal. But when I try to create a select form I can not. Mendix states that a select form can not have a microflow as datasource. Why? I fail to grasp the reason. Now I have to make my own select button with a custom microflow. [EDIT] What I try to achieve is to set the replacer of a person. To above situation works with custom microflows. Allthough you have to use a goto form instead of select form because a select form needs a select button and can not have only a custom microflow button. But now an administrator has to set the replacement because someone has become ill and can not do it him or herself. Then the situation gets even worse because when you place a employee dataview and place a employee datagrid inside you can not pass both objects to the microflow. Mendix will generate an error. The only sollution I see now is creating an extra reference set and connect the allowed replacements and then let the administrator do a selection of this list. Nice how something so simple can get so complicated..... Regards, Ronald
1 answers


I have a similar requirement and solved it as follows:

  1. Created and additional attribute on my entity to contain search text
  2. Put that attribute on my form via a text box control
  3. Created an on change microflow that is called by that text box when the user enters or changes search text (i.e. person name in your case)
  4. This microflow checks to see if there are one or more records that contain the text entered by the user.
  5. If there is one match, I simply set the association with that value via the onchange microflow
  6. If there is more than one match, I use a formloader to display a form containing the parent entity and a nested datagrid, sourced by a microflow that shows all child objects that match the search text entered by the user
  7. If there are no matches, I message the user to try again

Its a bit of work, but functions well and it prevented me from having to create another association, which I did not want to do.

Let me know if you would like to see more details or have other questions.