Constantes
This section presents the variables that are already initialized at the beginning of the script and can be used in your scripts. In addition to the list, every DataField present in the task is available.
Variable |
Content |
CURRENT_USER_ID |
Current user ID. This is the SYS02 identifier of the current user. |
CURRENT_USER_FULLNAME |
Current user full name. This is the SYS02 value for the current user. |
CURRENT_USER_GROUP |
Current user group. This contains values such as … |
CURRENT_USER_CATEGORY |
Current user category. This contains values such as SUPERADMIN, ADMIN or USER. |
CURRENT_DOMAIN |
Active domain in which the task is executed. |
CURRENT_SITE |
Active site for the current client. |
CURRENT_LANGUAGE |
Language of the current user. |
CURRENT_CHAIN_ID |
Identifier of the last used chain. |
CURRENT_TASK_ID |
Identifier of the task executing the script. |
CURRENT_TASK_TYPE |
Type of the task executing the script. |
CURRENT_TASK_DOMAIN |
Active domain in which the task is executed |
CURRENT_TASK_STATE |
Statut of the task executing the script (tsNormal, tsNew, tsModify, tsDelete) |
CURRENT_TASK_TABLE |
Table in which the task executing the script is operating. |
CURRENT_RECORD_KEY |
Selected record key (XML) |
CURRENT_PAGE_ID |
Identifier of occurrence of the currently selected page. |
CURRENT_DATAPAGE_ID |
Identifier of the currently selected page. Datapage identifier is for example “DIVERS_COURRIER” in ADR02. |
CURRENT_FIELD_ID |
Identifier of the currently selected field. If <Field ID=“ANNUEL” InternLabel=“Annuel” DataFieldID=“CGEBFI.BUDGET13” Row=“1” LabelColumn=“1” Column=“15” Width=“12” Height=“1” ScriptOnValidate=“true” /> was selected, this variable would contain ANNUEL. |
CURRENT_DATAFIELD_ID |
Identifier of the datafield connected to the currently selected field. If <Field ID=“ANNUEL” InternLabel=“Annuel” DataFieldID=“CGEBFI.BUDGET13” Row=“1” LabelColumn=“1” Column=“15” Width=“12” Height=“1” ScriptOnValidate=“true” /> was selected, this variable would contain CGEBFI.BUDGET13. |
CURRENT_FIELD_VALUE |
Value contained in the currently selected field. |
GRID_LAST_SELECTED_ROW |
Current grid selection’s row id. |
GRID_LAST_SELECTED_COL |
Current grid selection’s col id. |
Variable |
Content |
LOCAL_DATETIME |
Current date and time. |
LOCAL_DATE |
Current date. |
In addition to the global variables corresponding to DataFields, additional variables are available in the scripts.
Variable |
Content |
todayDate |
Today’s date. |
ONE_HOUR |
Value of one hour of time. Can be used to increase a date by a number of hours between 1 and 23. If you want to increase by more than 23 hours, it’s better to first add a number of days and then add the remaining number of minutes |
todayYear |
Current year. |
todayDateTime |
Current date and time. |
configDir |
Configuration directory. This can be used to access the Config directory. |
userTempDir |
Temporary directory for the current user. |
userId |
Current user identifier. |