Check UserRole in microflow expression

2
I want to make a microflow which shows a read only or an edit form based on the user role of the current user and the status (an attribute) of the object that will be shown on the form. I have two sets of user roles which can edit for a certain status of the object and a third set which can never edit. I would like to use a single retrieve of the UserRole(s) of the current user and to use the user role tokens (e.g. [%UserRole_Administrator%]) to determine the role of the user. However, it seems that in a microflow expression in an exclusive split, I cannot use the user role tokens . Currently, I have solved this by using two retrieve operations using the user role tokens. If not empty, then check the status of the object, if empty, then show the read only form. I would like to know: is there a more efficient way, or how do you make such a microflow?
asked
1 answers
0

No, there is no more efficient way. But as an alternative you can make your own enumeration (readonly / edit) that is filled based on the role. Then you can use an exclusive split, but the logic is simply moved somewhere else.

answered