Skip to main content
Skip table of contents

Variables

Ytria Automation scripting allows the use of system variables set by the context of execution (e.g. current date and time, current tenant or organization name, current loop index etc.

Variable names can be any combination of characters (letter, number, other signs), except for this list of reserved names that are used by Ytria Automation as system variables:

Date: current date YYYY-MM-DD

DateTimeISO: current date and time in ISO8601 format, GMT

Time: current time (24 hours format) HH:MM:SS

FolderDocuments: Windows account Documents folder path (%USERPROFILE%\Documents)

FolderLocalAppData: Ytria local app data folder path (%LOCALAPPDATA%/Ytria)

FolderTemp: Ytria temp folder path (%TEMP%/Ytria)

LastExportFilePath: latest file path used for export

CurFilePath: path of the automation script being run

SystemMessage: last info message set by Ytria Automation

LastError: last error raised in the current script/job - NB: warnings are not recorded with LastError

Loop context

LoopIndex: current loop index

ListSize: current list size

ListName: current list name

ListAction: name and parameters of the current action in a loop

ErrorAction: Ytria automation errors associated with each action in a list are stored in an error list made by SetVarListErrorAction, that can be queried with ErrorAction

ErrorSystem: system errors associated with each action in a list are stored in an error list made by SetVarListErrorSystem, that can be queried with ErrorSystem

Grid context

NewestGlobalCommentColumnID: column ID of the newest comment column added by the current script

GridSelectionCount: number of rows selected in the grid

In sapio365, the following names are also reserved:

O365Tenant_DefaultDomainName

O365Tenant_InitialDomainName

LastLoadingError

PrincipalUserName

PrincipalUserEmail

PrincipalUserType

DisplayedUserName

SessionName

SessionTechnicalName

SessionUserName

SessionType

SessionUserDisplayName

OnPremEnabled

OnPremLoaded

OnPremAzureADConnectServer

SessionUserID

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.