Good Evening, I am revising some old code for a redirect from the web. I went hunting in one of my other databases to figure it out. I am still getting some syntatical errors. Can any one help? This needs to get the users mail file name. Our code is currently in formula so the last thing I want to do is re write very much. My issue is that I need to grab the whole last name not part as with prior releases. Please help. Thanks much
Laura
fname:=@Word(@Name([CN];@UserName);" ";1);
lname:=@Word(@Name([CN];@UserName);" ";2);
mailboxname:=“mail/” + @Left(fname;1) + @Left(@Rightback(lname;“;”);); + “.nsf”;
srv=@Word(@DbName;“;”;1);
@Command([FileOpenDatabase];srv:mailboxname)
Subject: @formula help needed
This part
mailboxname:=“mail/” + @Left(fname;1) + @Left(@Rightback(lname;“;”);); + “.nsf”;
looks wrong. It should be something more like:
mailboxname:=“mail/” + @Left(fname;1) + @Left(@Rightback(lname;“;”);" ") + “.nsf”;
with some argument for the @Left and without the semicolon before the plus sign.
Subject: @formula help needed
Try using @MailDBName formula.
Regards,
Nitin
Subject: RE: @formula help needed
Thanks for your response however, that command does not work from the web. Thanks
Laura
Subject: @formula help needed
What’s wrong with:
MailfileName := @DbLookup(“”:“” ; “”: “names.nsf” ; “($Users)” ; @UserName ; “MailFile” )
Subject: @formula help needed
If you want use Lotus Script:
Dim session As New NotesSession
Dim doc As NotesDocument
Dim dbMail As New NotesDatabase( “”, “” )
Set doc=session.DocumentContext
Call dbMail.OpenMail
Print “[mail/”+dbMail.FileName+“]”
Subject: @formula help needed now lotus script help?
Hi, I like that alot better then any thing else I have seen. However how do I get it to use the log in name to look this up and put in a browser? thanks
Larua
Subject: RE: @formula help needed now lotus script help?
I don’t understand where you put the code for open a mail file? However to get a login name you must write an agent with the option “run as web user” actived, and then you must write:
dim session as New NotesSession
Dim current as NotesDocument
set current=session.DocumentContext
LoginName= “@Name([CN];@UserName)”
var=Evaluate(LoginName,current)
LoginName = Cstr(var(0))
Subject: RE: @formula help needed now lotus script help?
To get the current user in script you set the agent to run as web user and then simply use
name$ = notesSession.EffectiveUserName
doesn’t anyone read the help anymore?