How do reference set selectors work?

I am following the Building an Event App Using Microflows learning path. In 4.3.3, you create a `Ticket` entity with a many-to-many relation with `Days`, and you need to create an edit page for ticket. I added a reference set selector of `Days` to the `Ticket` edit page. After a bit of trial and error (and trying to interpret the documentation), I figured that I needed to add a ‘Select page’ to the ‘Add’ button. Now that I could generate the select page using a template (scroll to the bottom to see screenshots), I wonder how all this works. Question 1: How does the select page’s save button work? The save button is configured to ‘Save changes’, but it is not in the context of any data view. How does it even know what to save? I.e., where is the connection between the checkboxes and the resulting (?) list? Where is this selection list even saved? Obviously not in the database, but there is also no microflow or similar where I can see the data flow. Question 2: Where do checkboxes come frome? They are neither visible in the structure view nor in the design mode. There seems to be only a plain list view, nothing special that indicates checkboxes are shown. This can only be seen when actually running the app and opening the page. Question 3: How would I pre-select checkboxes for already selected items? Again, as it is totally unclear to me where the data is saved, I have no clue whatsoever where to start. Question 4: Assume the selection list is rather small (e.g. usually an event only features at most 5 days). In this case, having extra ‘add’ – ‘select’ – ‘save’ clicks is rather cumbersome. I would rather like to have a selection list directly in the `Ticket` edit page. So how would I edit the reference set in place? Again, as it is unclear to me how the selection page template works, it is really challenging to transfer this behaviour to other places.   I use Mendix 8 beta 2.   Edit page (live):   select page (live):   edit page (structure): select page (structure):
1 answers

Answer one:

When using the reference set selector you are influancing the references between objects. Note that after selecting you have set the reference but it is not yet saved to the database. That will happen if you save your main object.

Answer two:

Select pages are a special set. The checkboxes are there to make it visual easier to see which options you have selected. You can modify the page to your own liking.

Answer three:

You can not. What you could to is already set references in a microflow before you show the main object. It would then already show those references and you can let the user still remove or add references.

Answer four:

Use a widget for that:

Hope this helps,




The magic happens in the specific select buttons. So in the reference set selector you define the page where the objects can be selected and the select button makes the magic happen to set the right reference for those selected objects. You can create your own microflows and pages but that is quite some more work then using the auto generated pages.

The styling should be done on the select page. You can put the right classes on the objects there.