on-change microflow

1
Hi, I just started using Mendix and I have a question regarding on-change microflows. In my model I have employees. You can upgrade an employee to a coordinator, or a doctor. But it can't be both, so I wanted to deploy an error when you choose a employee who is allready a doctor, or coordinator. I wanted to do this by using a on-change microflow, but perhaps it is also possible to just not display the invalid employees. Thanks in advance, Paul EDIT It worked, using validation rules, thanks Samet
asked
3 answers
1

How do you upgrade an employee? Is this a attribute or a reference to another entity?

Anyway, you can easily add an onchange microflow to your attribute in your dataview.This way you could perform a validation. You could also use a before commit microflow which validates the user input.

Edit after repost:

If you're using a reference you can easily do the validation check. Just check the association from your employee to the coordinatior/doctor. If this assocation is empty, that means your employee is not a coordinator/doctor.

answered
0

It is a reference to another entity. I'm watching a tutorial about advanced microflows now in which before commit microflows are explained ;)

answered
0

It is still not clear to me how I check the to be created coordinator with the list of doctors who are already listed. (Btw.. doctors and coordinators are both associated ánd generalized to Employee)

answered