Same questions as: https://forum.mendix.com/link/questions/87860
The problem is with task delegation that you can only delegate tasks to persons with the exact same user role set. Otherwise you might end up with all kinds of complications that the person where the task is delegated to suddenly can not see certain fields etc.
So create a microflow where you retrieve the user role set of the current user that wants to delegate a task. Then iterate over the user roles and retrieve all the users with that specific role but remove the current user from that list. Then use the intersect function to intersect on all those retrieved lists. Because only the user that is in all those list would be a person where he could delegate the work to.
Hope this helps,