NotesClient application. I have a checkbox type field in a form. I am using “Formula for choices” and trying to display different choices bases on a role. My code is
@If(@IsMember(“[Legal]”;@UserRoles);
“Choice 1 | C1” :
“Choice 2 | C2” :
“Choice 3 | C3” ;
“Choice 1 | C1”:
“Choice 2 | C2”)
I would expect that if the user has the [Legal] role, then three choices would display. Only two choices display when the [Legal] role is assigned or when it is not assigned.
Your code looks good to me. The only thing I think you need to do is to make sure that you have checked the box “Enforce a consistent Access Control List accross all replicas” in the ACL / Advanced window.
Are you sure that the role name is spelled and capitalized correctly?2. Are you sure that the role assignment has taken effect when you’re testing? You need to close all sessions with a database before ACL changes take effect. Use the Notes client’s Security button (in the taskbar) to verify your assigned roles when testing.
Is the test database on a local workstation, where the @userroles function will return “” (if you’re not enforcing a consistent ACL)?
Item 2 was the problem. I still had the database bookmarked in designer. Even though I did not have any design elements open, that must have been the problem. Once I removed the bookmark from designer, it worked like it was supposed to.