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



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...