I tested in both way, designer and full client instance. It looks very strange because if I use hasRole directly in the Alarm Status Table binding it works, but if I use in the client tag it has no effect.
I have the same issue, I have a Vision Client Tag "EnableSecurity" with an expression:
hasRole("Administrator") || hasRole("Engineer") || hasRole("Supervisor")
On a button .enable is tag [client]EnableSecurity
The button is enabled in the Designer but not in the Client instance (version 8.1.25)
Edit: This works correctly if referencing {[System]Client/User/RolesString} as Aiasa21 mentioned:
if((indexOf({[System]Client/User/RolesString}, "Administrator") >= 0) ||
(indexOf({[System]Client/User/RolesString}, "Engineer") >= 0) ||
(indexOf({[System]Client/User/RolesString}, "Supervisor") >= 0),true,false)
While this is an old topic, I'm experiencing the same issue in 8.1.45, so guessing this still hasn't been fixed. But I think there's just nothing to trigger a change, so I left the hasRole expressions but added this to the end:
&& {[System]Client/User/Username} != ''
So now as an example my expression looks like this for my operator role client tag:
While I could put all the hasRole expressions inside a parenthesis, it doesn't really matter since we have to have a username for the last one to evaluate to true anyway.
Now since it's referencing an actual tag, when the username changes, this triggers an update and all the roles are re-evaluated.