I am trying to check a user role in exclusive split with the following code: $currentUser[system.UserRoles = '[%UserRole_administrator%]'] What am I doing wrong? Link to screenshot: https://ibb.co/RQw2XK3
Mees von den Hoff
The tokens for userroles are only available in Xpath retrieves, this is a regular microflow expression. And the brackets you use are only used in Xpaths, not here.
So first do a retrieve of a userrole object where ID = userrole_token. Then you can do an exclusive split to check if the association from currentuser to userrole matches that object.
Sytze de Bok
You are using an XPath expression in an exclusive split.
I had the same kind of issue. But I had to check if the user had a certain role. This is what I did to solve it.
You can get the account from a retrieve with: [id = $currentUser/id] (range = first)
I then got all the userroles linked to the account. (retrieve association account)
Retrieve the userrole you need. (retrieve UserRole : [id = ‘[%user you want%]’]