SnTT.jpgI hate it when I still see @formula code that uses @IsMember.
You usually see this in combinations like (e.g. as a hide-when formula):
@IsMember("[Admin]";@UserRoles)

A much cleaner approach is:
@UserRoles="[Admin]"

It get's worse, if one has to check for multiple roles:
@IsMember("[Sales]";@UserRoles) | @IsMember("[Marketing]";@UserRoles)

Far more elegant (and easier to read):
@UserRoles*="[Sales]":"[Marketing]"

Note the *= (asterisk equal operator) instead of = (equal operator).
This is absolutely necessary, because you are comparing 2 lists.
In this case either roles is sufficient to pass the test.

Of course, replace @IsNotMember by negating the comparison:
!@UserRoles="[Admin]"
Always put the ! (exclamation mark) in front of the comparison.
!= might have a different effect when comparing lists.

Category:  Domino/Notes  | TechnoratiTechnorati: ,