Problem solve Get help with specific problems with your technologies, process and projects.

Extracting the user name without it returning the server name

How do you phrase an evaluate statement to extract the user name without it returning the server name or the name of the person who signed the agent?

I have the following code, which I thought would do the trick, but it continues to return my name (the agent signer) rather than the logged-in user name:

macro = |@ReplaceSubstring(@ReplaceSubstring(@Name([Abbreviate]; @UserName); " "; "_"); "/"; "-")|
	dummy =  Evaluate(macro) 'Evaluate is used to skip server name
	key = dummy(0) & "_" & "OPEN"

If you are running the agent over the Web, this is actually fairly simple and you won't need Evaluate. You simply use the Remote_User CGI variable. A simple LotusScript example follows: Dim nsCurrent as New NotesSession Dim ndocWeb as NotesDocument Dim strUser as String Set ndocWeb=nsCurrent.DocumentContext strUser=ndocWeb.Remote_User(0)

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com'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 ...