Integrate add-buton and microflow in reference set selector
Dear, I have a PatientNewEdit form and in that form a row with Doctor and a reference set selector. This allows me to add doctors to a patient. But I want to constrain the doctors I can add to this patient. It is a difficult constrain, so only an XPath wouldn't work. So I have made a microflow and put that button next to the add and remove button in the reference set selector. That microflow computes the available doctors and then I can press the Add-knop in the reference set selector and select on of the available doctors. But I want to integrate the compute button and the add-button, but have a problem with this. I tried to add an activity to the microflow, called show doctor_select, but when I do this and click on the microflow, I can see all doctors and not only the one which are allowed. When I first click the microflow now, close the doctor _ select and press Add, I can see all the allowed doctors. Why can I see the 'updated' doctor select when I click Add after clicking the microflow, but why don't I see the 'updated' doctor select when I integrate a show form at the end of the microflow?
You can solve this by adding an association (referenceset) Patient_AvailableDoctors and fill that before the form is opened. In the form reference set selector constrain over that association.