Manage Learn to apply best practices and optimize your operations.

@Userroles and multiple userroles

This tip descrbes a method for handling userroles.

We all know of using @userroles for hiding design elements using @Ismember or @Isnotmember. But @Isnotmember does not check for multiple roles. Here's an easier way.

 <style type="text/css"><!--
.TPtext { color: #000000; 
background-color: #FFFFFF; }
.TPkeyword1 { color: #0000FF;
 background-color: #FFFFFF; }
.TPstring { color: #008080; 
background-color: #FFFFFF; }
.TPbracket { color: #FF0000; 
background-color: #FFFFFF; }
.TPoperator { color: #000000; 
background-color: #FFFFFF; }

Suppose a field 'Status' has to be 
hidden to all except for people 
with roles "[Admin]" or 

"[Superuser]". This could be usually 
done by using 
<span class="TPtext">
 @<span class="TPkeyword1">
Isnotmember</span><span class=

@<span class="TPkeyword1">userroles

class="TPbracket">) </span>| @
<span class="TPkeyword1">Isnotmember

<span class="TPstring">"[Superuser]"

</span><span class="TPbracket">)</span>

Instead we could use the permutated 
equality on lists as follows:
!<span class="TPbracket">(
</span>@<span class="TPkeyword1">

<span class="TPstring">"[Superuser]"

<span class="TPstring">"[Admin]"

This is lot more readable and shorter.

Do you have comments on this tip? Let us know.

This tip was submitted to the tip library by member Rajiv Menon. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Dig Deeper on Lotus Notes Domino Formula Language



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury