Example: Obtaining Session Properties
This example demonstrates how to use the TDConnection object to obtain the properties of the current session. Add the code to the procedure where these properties are needed. The properties do not depend on each other, so each of the properties can be retrieved separately.
The following are examples of session properties:
TDConnection.ServerName TDConnection.ServerTime TDConnection.DomainName TDConnection.ProjectName User.UserName
Note that there is no need to use TDConnection to retrieve the user name because the workflow has a predefined User object. For details, see TDConnection Object.
The example below tests the first five characters of the server URL to determine whether the user is connected to the server using HTTP or HTTPS:
If Left(UCase(TDConnection.ServerName), 5) = "HTTPS" Then MsgBox "You are currently connected to the server using SSL." Else MsgBox "You are not using SSL." End If