Delete Reference Set Objects in Microflow

0
Hi, I’m fairly new to Mendix and I’m building out my first individual project for a class. My project involves an entity that contains ‘Employees’ and an entity that contains ‘Groups’. These two entities are connected by a many-to-many reference set with the Employees and Groups referring to each other. I can add and remove groups from an employee using a Reference Set Selector just fine, but I need to be able to remove the groups from an employee using a Microflow. I haven’t been able to figure out how to target those reference set objects using a Delete action. Pulling a list of the employee’s groups and then deleting the objects from that list seems to delete the groups themselves, which is very undesirable. Any help is appreciated!
asked
2 answers
1

Instead of deleting the group objects, you can just set the association of employee to group(s) as empty in the microflow and then the employee object will no longer be associated to the group(s) that were previously assigned.  

You would just need to use a change object action and the association should look something like $Employee_Group then set that reference attribute to empty in the change action.

answered
0

Aaron,

In a change Action, you should select the reference set and click Remove.  Then you can place the list of objects you want to remove from the reference set in the Value box.  The screen shot below demonstrates this:

Hope that helps,

Mike

answered