Current user in expressions

How to access the currently logged-in user in expressions

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 09.09.2024
Updated: 09.09.2024 | Section outsourced to own page.

The currently logged-in user can be accessed as follows:

Access via Expression More information
OCL Timsession.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 vtcapp module can be used to determine the currently logged-in user:

user = vtcapp.currentlogin()

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

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

  • The default value for SQL queries is always the logged-in user as the basis of the OCL expression. This means that the currently 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 variable varLogin.

bearbeiter = varLogin

About user rights
Bitte wählen Sie Ihren Standort