CREATE_OBJECT
Script Function: Creates an object (Calendar, Login and Variable only).
General Information
- Only objects of the object types "Calendar", "Login" and "Variable" (only static) can be created with this script function.
- You require a write privilege (W) for the object types Calendar, Login and Variable to be able to create them.
- The script statement causes all open transactions of the script to be written to the AE database.
Use the script statement :ON_ERROR to define the reaction to errors that might occur. It is also possible to analyze error messages with the script functions dealing with the handling of errors (see links on bottom of this page). By default, script processing is continued but it can also be stopped.
Syntax
CREATE_OBJECT (Object Type, Object Name, [Folder], [Title] )
Syntax |
Description/Format |
---|---|
Object Type |
Short Label of the object type |
Object Name |
Name of the object |
Folder |
Name of the folder in which the object is to be created |
Title |
Title of the object |
Return codes |
---|
"0" - The Calendar object was successfully created. |
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")
Syntax
CREATE_OBJECT (Object Type, Object Name, [Folder], [Title] )
Syntax |
Description/Format |
---|---|
Object Type |
Short Label of the object type |
Object Name |
Name of the object |
Folder |
Name of the folder in which the object is to be created |
Title |
Title of the object |
Return codes |
---|
"0" - The Login object was successfully created. |
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",)
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 To create a static Variable object of the type XML, enter its short name. |
Object Name |
Name of the object. |
Folder |
Name of the folder in which the object is to be created |
Title |
Title of the object |
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. |
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 |
Validity |
Scope. Allowed values: "*", "FREE" (Default value), "HON", "JBN", "JPN", "JPS", "USN", "USS" "*" = No scope |
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. |
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 |
---|---|
Determines the reaction to certain errors and messages of script elements |
|
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