Creates an item Object to add a new item to the workspace specified by 'WS_WORKSPACE_ID.' The parameter takes the value for Workspace ID as it appears on the Workspace Settings page. Values for Item Detail fields are passed through properties on the object using Field IDs.
Merges data from the associated item with the advanced print view specified by 'PRINT_VIEW_NAME.' The function returns a text string containing the combined result. The print view must be one set up for the associated item's workspace. See Email() Object.
Returns the workspace item specificed by dmsID. Deprecated.
Print information to a debug message when testing.
ImportantTo improve performance, comment out or delete any debugging code when you finish writing a script.
Returns the "return value" required at the end of Precondition and Validation scripts.
Checks if the user specified by userID is in the user group specified by 'GROUP_NAME'
Checks if the user specified by userID is assigned to the user role specified by 'ROLE_NAME'
Returns a list of groups the user belongs to
Returns a list of roles assigned to the user
Loads an array of user records from the user group specified by 'GROUP_NAME'.
Loads an array of user records from the user role specified by 'ROLE_NAME'.
Returns a user object
Returns the user group specified by GROUP_NAME.
ID of the workspace associated with the script
Login ID of the user triggering the script
ID of the workflow transition controlled by the script (see Transition Properties in the Workflow Editor)
ID of the item workflow state after the transition is performed (see Transition Properties in the Workflow Editor)
item is a pre-defined, top-level object. The workspace item associated with the script is automatically loaded into the item object. Item Detail fields are implemented as properties on the object through Field IDs. Field IDs are always uppercase.
Performs the workflow transition specified by transID (see Transition Properties in the Workflow Editor). The comments parameter is optional. If comments are specified, they are saved with the workflow step in the Workflow Actions tab.
Is version in the array the latest version? (1 = True; 0 = False)
Is version in the array the Working version? (1 = True; 0 = False)
User ID of the item Owner
Date and time the item was created (Created on in Owner and Change Summary)
ID of the user who created the item (Created by in Owner and Change Summary)
The item.master object provides read/write/update access to the associated item's ownership data. The object's arrays are readable and modifiable as any other standard array.
Properties on the item.master Object
ID of the user who currently owns the associated item
Array of IDs of the users who are currently Additional Owners of the associated item
Array of user groups that are currently Additional Owners of the associated item
item Object Grid Array
Adds a row to the item Grid and returns the new row. You can pass row field values as an associative array of name-value pairs or in a row object. If you do not use an argument, the new row is blank. You can assign values using properties on the item object. You can also assign values through variables declared in the script, including ones used to add other new rows. You can use this capability to add multiple rows in a single script through cloning. You do not need to assign values to all fields in a row, only to fields you want to populate.
Method to delete the row in the item Grid using the array position specified by INDEX. Use this method with care since you cannot undelete a row.
item Object Attachments Array
Properties on the Attachments Array
Date and time of the last or current checkout of the attachment
ID of the user who performed the last or current checkout
ID of the user who created the attachment
Description of the attachment
Name of the attached file (physical name)
Size of the attached file in bytes
Current version of the attachment
Name of the folder the attachment is "stored" in, if any
Title of the attachment
Date and time on which the attached file was last modified
ID of the user who checked in the current the version of the attachment
Status of the attachment (Checked IN, Checked OUT, Locked, Deleted, Archived)
item Object Relationships Array
Method to add a row to the item's Relationships tab. You can pass row property values as an associative array of name-value pairs (RELATED: target, TYPE: typeStr, DIRECTION: dir, DESCRIPTION: desc) or in a related object. Assign values using properties on the array.
Method to set the type of the relationship at the array position specified by INDEX (Relationship Type) on the tab). The typeStr parameter takes one of these strings as its value: Cross-Reference, Substitution, Application, Manufactured, and Other (See Descriptor). Returns an error if typeStr is invalid.
Method to write the description of the relationship at the array position specified by INDEX (Description on the tab). The description is passed as a string assigned to the desc parameter.
Method to delete a relationship row in the item's Relationships tab using the array position specified by INDEX. Use this method with care since you cannot undelete a row.
Properties on the Relationships Array
dmsID of the relationship target item
Descriptor of the relationship target item
Relationship type (typeStr): Cross-Reference, Substitution, Application, Manufactured, and Other (See Descriptor)
Direction of the relationship (dir): Unidirectional or Bidirectional
Description of the relationship (desc)
Target item of the relationship (target)
Property on the relationship target item
item Object Workflow Items Array
NoteIn Revisioning Workspaces, the Linked Items tab becomes the Managed Items tab to enable product lifecycle management (see Linked Items).
Description of the workflow state after the transition occurrred (see State Properties in the Workflow Editor)
The item.project object provides access to root project tasks in the associated item's Project Management tab as well as sub-tasks and children. Through properties on the object, you can traverse and read data from items the project tasks are linked to (target items), including workflow- and revision-controlled items, items with milestones, and other project items with their own tasks (children tasks/subtasks). Methods on the item allow scripts to add manual and linked item tasks to the item.
Method to add manual or linked tasks to the item's Project Management tab. You can pass task property values in a task object, as an array of values, or in a related item. Properties passed are TASK_NAME=title, TARGET_ITEM=target, START_DATE=start_date, END_DATE=end_date, PROGRESS_PCT=progress.
Properties on the item.project Object
Task number (#on the Project Management tab)
Task title or name (Title/Item on the Project Management tab)
Task start date (Start on the Project Management tab)
Task end date (End on the Project Management tab)
Duration of the task in days (Duration on the Project Management tab)
Percentage of the task completed to date (% Complete on the Project Management tab)
Item that owns the task.
dmsID of task owner
Descriptor of task owner
Item the task is linked to
dmsID of the task's target item
Descriptor of the task's target item
Array of task's predecessor tasks (tasks in Pre column on the Project Management tab)
Array of target item's children tasks (subtasks); only on tasks linked to other project items (project tasks); children tasks can be manual, workflow/revision-controlled, milestone, or project task
Array of task's sub-tasks that returns values on target_id, title, start_date, end_date, duration, progress, predecessors, subTasks, children, status, owner, and target.
Workflow state of the task's target item; only on tasks linked to workflow-controlled items (workflow-controlled tasks)
Task status (Status on the Project Management tab)
Priority of the task's status
item Object Milestones Array
Methods on the Milestones Array
Method to set the workflow state associated with the milestone (milestones.workflowState). The "SHORT_NAME" parameter takes the value for the milestones.workflowState.shortName property.
Properties on the Milestones Array
Identifies whether the milestone represents a transition to or from the associated workflow state: ENTER or EXIT (Milestone Event in the Milestones tab)
Target date of the milestone (Target Date in the Milestones tab)
Milestone warning threshold defined as number of days before milestoneDate (Warning Period in the Milestones tab)
Percentage of the item's workflow that is complete when the milestone is reached (Workflow Progress (%) in the Milestones tab)
Workflow state associated with the milestone (Workflow State in the Milestones tab)
ID of the workflow state associated with the milestone (as shown in Workflow Editor State Properties).
Name of the workflow state associated with the milestone (as entered in Workflow Editor State Properties).
Description of the workflow state associated with the milestone (as entered in Workflow Editor State Properties).
Email() is a pre-defined, top-level object. You create an Email() object to send an email message to one or more email addresses. Message attributes are implemented through properties on the object. For example code, see Action Scripts in Scripting Examples.
Methods on the Email() Object
Sends the email message created with the Email() object .
Properties on the Email() Object
Assign a value to a property as a string or as a property on the item Object. For example, if the item has an email address as one of its fields (EMAIL_ADDRESS) and you want to send a message to that address, assign the value item.EMAIL_ADDRESS to the to property.
Single email address or list of email addresses delimited by a semicolon (;)
Same as to but sent in bc header of the message
Same as to but sent in bcc header of the message
Subject of the email message; string or passed as a property on the item object
Body of the email message. HTML or plain text string (see Content-type) OR passed as a property on the item object OR data passed from the associated item via a given Advanced Print View (see getPrintView() under Top-Level Functions).
Message header that identifies the format of the message body; supported formats are HTML (text/html( or plain text (text/plain). The default value is text/html.