Is it possible to enforce a maximum of 1 userrole?

3
Hi! A question: (how) Is it possible to block the possibility of having >1 userrole for a portalUser? I initially thought about a validation-check when pressing the "add" button of the reference set selector, but that seems not possible. So the best check I can imagine is a validation feedback when the person tries to save the portaluser with >1 userRole (with a message that this is not allowed). Or are there better options? Preferably an earlier check?
asked
2 answers
5

Create you own select popup which should contain a dataview with nested datagrid (datagrid B)) and open it by using a microflow button in the reference selector. The enclosing dataview object in which reference selecotor is nested, should be passed to this microflow.

On popup datagrid create a microflow button(select) which passes your entity(enclosing dataview) and the entity you want to associate (datagrid object). In this microflow you can add a check for the number of associated userroles and actually create the association.

answered
3

You could also create an enumeration with your userroles and an on-change microflow, adding the selected userrole and removing the others.

This way you avoid having to use a select form and don't suggest to the user that it is possible to add more then 1 userrole (since he can only select 1 option at a time)

answered