DeltaV User name

Hi Everyone,

I want to read a Username in VBScript. like frsgetcomputer() & frsVariables.gs_wsName.CurrentValue  both will give Workstation name.

when i use frsgetusername("username") , i am getting Boolean value only. even if i put blank spance in username the output will be same.

i don't know how to read a user name from VBScript. if you know the the solution ,kindly help me.

  • Hello!
    It's interesting because I use DeltaV 13.3.1 and there is not frsgetusername function, there is frsGetCurrentUser function, probably it is one and the same function, but l'll try to help you.

    There are two way:
    1. frsReadValue("DVSYS.THISUSER/UserName.A_CV"). I always use it
    2.

    Sub YourSub ()
    Dim sUser as String
    frsGetCurrentUser sUser
    MsgBox(sUser) 'You can see your current user
    End Sub

    And frsGetCurrentUser  returns true or false it's okay, True if current username successfully read else false

    I hope I was useful to you!

  • In reply to Dmitrii Kapitonov:

    Thanks Dmitrii, and you are correct. I posted wrongly, there is no frsgetusername (instead of frsGetCurrentUser )function.

  • In reply to THENNARASU R:

    Your welcome THENNARASU!
    I corrected my reply. You can use second way. It will work If you don't use Parenthesis