@username in lotus script

i would like to write command in lotus script to show current user who is accessing my system . i’ve open in Domino Designer Help and i saw some command which it may can do what i want . my command is like this .

    Dim formula As String

Dim user As Variant	

Dim session As  New NotesSession

'formula = |@Name([CN];"|& session.UserName &|")|

'formula = |@Name([CN];|& |@Username| &|)|

formula = |@Username|	

user = Evaluate(formula)	

'Print user(0)

Print session.UserName

this code worked in NotesClients well but when i launched in the web browser , it showed my server name , but that is not what i want . it should show my username

and then i tired to use this function

formula = |@Username|

user = Evaluate(formula)

no matter who i am , it would show my username every time. for example

if i am accessing as user 1 , it would show user1 and

if i am accessing as user 2 , it would still showed user1

what i want to know is . what should i do to show actual username ?

Can anybody tell me any suggestion ?

Subject: notessession

You don’t need to use @evaluate, you can use the notessession object

dim session as new notessession

username = session.username

If you’re running a lotusscript agent from the web you need to set the agent to run as web user from the properties box of the agent then use:

session.effectiveusername

Subject: thanks

thank you for your sugguestion , i’ll try again