CREATE_OBJECT

Script Function: Creates an object (Calendar, Login and Variable only).

General Information

Calendar

[Calendar] [Login] [Variable]

Syntax

CREATE_OBJECT (Object Type, Object Name, [Folder], [Title] )

Syntax

Description/Format

Object Type

Short Label of the object type
Only valid value: CALE

Object Name

Name of the object
Format: script literal or script variable

Folder

Name of the folder in which the object is to be created
Format: script literal or script variable

Title

Title of the object
Format: script literal or script variable


Return codes

"0" - The Calendar object was successfully created.
"20644" - There is already an object of this name.
"20710" - The object name contains invalid characters.

Comments

A calendar is created in the specified folder. If this folder does not exist or if this parameter is missing, the object is stored in <No folder>.

Examples

In the first example, the object "FIRM.CALENDAR2003" is created in <No folder>.

:SET &RET# = CREATE_OBJECT("CALE","FIRM.CALENDAR2003",,"Firm calendar for 2003")

Login

Calendar] [Login] [Variable]

Syntax

CREATE_OBJECT (Object Type, Object Name, [Folder], [Title] )

Syntax

Description/Format

Object Type

Short Label of the object type
Only valid value: LOGIN

Object Name

Name of the object
Format: script literal or script variable

Folder

Name of the folder in which the object is to be created
Format: script literal or script variable

Title

Title of the object
Format: script literal or script variable


Return codes

"0" - The Login object was successfully created.
"20644" - There is already an object of this name.
"20710" - The object name contains invalid characters.

Comments

Usually, a Login object is created in the specified folder. If this folder does not exist or if this parameter is missing, the object is stored in <No Folder>.

Examples

In the first example, the object "LOGIN.SMITH" is created in <No Folder>.

:SET &RET# = CREATE_OBJECT("LOGIN","LOGIN.SMITH",,"Standard Logins")

In the second example, a Login object is created in the folder "LOGIN_STD".

:SET &NEW# = CREATE_OBJECT("LOGIN","LOGIN.SMITH","LOGIN_STD",)

Variable

[Calendar] [Login] [Variable]

Syntax

CREATE_OBJECT (Object Type, Object Name, [Folder], [Title], [Error Handling], [Data Type], [Validity] )

Syntax

Description/Format

Object Type

Short Label of the object type
Allowed value: VARA

To create a static Variable object of the type XML, enter its short name.

Object Name

Name of the object.
Format: script literal or script variable

Folder

Name of the folder in which the object is to be created
Format: script literal or script variable

Title

Title of the object
Format: script literal or script variable

Error Handling

Handling when the variable at runtime does not contain a value

Allowed values: "E" or "I" (Default value)

"E" = An error message is output.
"I" = The variable is initialized according to its variable type.

Data Type

Variable type

Possible values: "String" (or "C"), "Number" (or "F"), "Timestamp" (or "T"), "Time" or "Date"

Allowed values: "C" (default value), "F" or "T"

"String", "C"= Text
"Number", "F" = Number
"Timestamp", "T" = Timestamp
"Time" = Time
"Date" = Date

Validity

Scope.

Allowed values: "*", "FREE" (Default value), "HON", "JBN", "JPN", "JPS", "USN", "USS"

"*" = No scope
"FREE" = Freely selected
"HON" = Host - each host name
"JBN" = Job - each job name
"JPN" = Workflow name - each workflow name
"JPS" = Workflow session - each workflow activation
"USN" = User - each user name
"USS" = User session - each user session

Variable Type

Parameter to define the type of Variable object you want to create. (optional)

Allowed values: "STATIC" or "XML"

Default value: "STATIC"


Return codes

"0" - The Variable object was successfully created.
"20644" - There is already an object of this name.
"20710" - The object name contains invalid characters.

Comments

You can only create static Variable objects with this script function. Refer to the description of the Attributes tab of Variable objects.

A variable is created in the respective folder. If this folder or the parameter do not exist, the object is stored in <No folder>. If no optional parameter is specified, the default values "String" (for the data type), "Freely selected" (for the scope) and "Initial values" (for Key not found) are used.

Example

In this example a variable is created in which the retrieved number of files can be stored.

:SET &RET# = CREATE_OBJECT("VARA","OUTPUT.WEBHELP.VARA","VARIABLE/TEST","Number of Help files","I","F","FREE")

See also:

Script element Description

:ON_ERROR

Determines the reaction to certain errors and messages of script elements

REMOVE_OBJECT

Deletes an existing object

MODIFY_OBJECT Changes an existing object (only Calendar, Login and Variable)
MOVE_OBJECT Moves an object to a folder
ACTIVATE_UC_OBJECT Activates an object

Script Elements - Handle Objects
Script Elements - Error Handling and Messages
About Scripts

Script Elements - Alphabetical Listing
Script Elements - Ordered by Function