Current user in expressions

How to access the currently logged-in user in expressions

You can access the currently logged-in user as follows:

Access via Expression More information
OCL
Session.allInstances->first.login About OCL
COM

Vertec.user

Information about COM
VB-Script

Vertec.user

Information about VBScript
Python scripts

The currentlogin() method of the module vtcapp can be used to determine the current logged-in user:

user = vtcapp.currentlogin()

About Python
SQL Expression
  • The \login_id variable can be used to access the ID of the current logged-in user within an SQL folder. For example, the user can search for their managed addresses in an SQL folder:

    (Name like '%\1%' OR Alias like '%\1%') AND accountmanager=\login_id

  • The default value for SQL queries is always the logged-in user as the base of the OCL expression. The current logged-in user can be shown there using self.asstring. See the section Search in multiple fields.
About SQL folders
User rights

In expressions on user rights, the current login can be accessed via the varLogin variable.

user = varLogin

Information about user rights

Netherlands

United Kingdom