Manage Learn to apply best practices and optimize your operations.

Capturing User Roles via LotusScript for a Web Agent

This tip describes how to capture user roles via a LotusScript Web agent.

p>Using Evaluate(@UserRoles) is a good way to capture user roles in LotusScript. The only problem is that if you use it for a web agent, it captures the user roles of the PERSON/ENTITY WHO LAST SAVED THE AGENT rather than the user roles of the web user who happens to trigger the agent. That's because, by default, agents run with the privledges of whoever saved the agent.

Consider the following code:

userRoles = Evaluate("@UserRoles")
Forall role In userRoles
If Ucase(role) = "[ADMIN]" Then
admin = "Yes"
Exit Forall
End If
End Forall

By default, this will get the user roles of the person who last saved the agent. To make it so that it gets the user roles of the web user who triggered the agent, do the following:

  1. In Designer, goto Agents.
  2. Right click on the agent for which you have the Evaluate(@UserRoles) code.
  3. Click on Agent Properties.
  4. Click on the Design tab (3rd tab).
  5. Check the box labelled "Run Agent as Web user"

The agent should then perform as desired.

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • 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 ...