Document
- Source
Methods
(inner) addToFolder()
Adds current document to one folder while removing it from another. NULL string can be substituted for either argument to skip the action.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) all() → {Promise.<any>}
Returns the value True.
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- Promise.<any>
(inner) attachmentLengths(excludeMIMEBody)
Returns a number or a number list containing the length of each attachment to the current document. The number(s) returned are only approximations; the actual size(s) of the attachment(s) may be slightly different.
Name | Type | Default | Description |
---|---|---|---|
excludeMIMEBody | boolean | true |
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) attachmentModifiedTimes(excludeMIMEBody)
Returns a datetime that displays the date on which the file attachment associated with the current document was last modified. If the document contains more than one file attachment, returns the modification dates in a datetime list.
Name | Type | Default | Description |
---|---|---|---|
excludeMIMEBody | boolean | true |
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) attachmentNames(excludeMIMEBody) → {TextOrTextList}
Returns the operating system file names of any files attached to a document. If there are multiple files attached, the names are returned as a multiple-value text list.
Name | Type | Default | Description |
---|---|---|---|
excludeMIMEBody | boolean | true |
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- TextOrTextList
(inner) attachments(excludeMIMEBody) → {number}
Returns the number of files attached to a document.
Name | Type | Default | Description |
---|---|---|---|
excludeMIMEBody | boolean | true |
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- number
(inner) author() → {Array.<string>}
Returns a text list containing the names of the author(s) of the current document.
- Source
- See
- For further information, see www.hcltechsw.com
All the authors of the current document. For authors with hierarchical names, Notes/Domino returns the abbreviated form of the name (as in Denise Lee/Research/Acme), rather than the canonical form (CN=Denise Lee/OU=Research/O=Acme).
- Type:
- Array.<string>
// If a document has one Authors field that contains: Mary Tsen, David Smith, Denise Lee/Research/Acme. This example returns: ["Mary Tsen", "David Smith", "Denise Lee/Research/Acme"]
rosettajs.Document.author();
(inner) chooseFolders()
Displays the Folders dialog box, which allows you to select a folder in which to file the current document.
- Source
no plans to implement
- Type
- Error
(inner) deleteDocument() → {Promise.<any>}
Deletes the current document.
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- Promise.<any>
(inner) deleteField() → {void}
Deletes the value of an editable field.
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- void
(inner) discoverFolders()
Displays the "Folders containing current document" dialog box.
- Source
no plans to implement
- Type
- Error
(inner) docChildren(string1, string2, string3) → {string}
Returns the number of child documents or categories belonging to the current document or category. Only immediate responses count as children. For example, the responses to a main document are its children, but the responses to a response document are not.
The parameter descriptions are:
- defaultString The text to return. If a "%" is used in the string, it will be replaced with the number of children documents or categories. Example: "% Responses."
- zero-string The text to return if the document or category has no children, such as "No Responses."
- one-string The text to return if the document or category has just one child, such as "One Response."
Name | Type | Description |
---|---|---|
string1 | string | If this is the only argument, it is the defaultString. If there are more than two arguments, this is the zero-string. |
string2 | string | If there are two arguments, it is the defaultString. If there are three arguments, this is the one-string. |
string3 | string | This is the defaultString. |
- Source
- See
- For further information, see hcltechsw.com
The return value depends on how you call docChildren:
- numChildren If docChildren is called with no parameters, then the number of child documents belonging to the current document or category is returned. You cannot convert special text to a number.
- childString If docChildren is called with one or more parameters, it returns the appropriate string, based on the number of child documents belonging to the current document or category. You cannot convert special text to a number.
- Type:
- string
rosettajs.document.docChildren(); // This example returns 3 if there are 3 responses
// This example returns 3 Responses. The appropriate number is substituted for %. If the document doesn't have any responses, this formula returns 0 Responses.
rosettajs.document.docChildren("% Responses");
// This example returns 3 Responses. This time, if the document doesn't have any responses, the formula returns the message No Responses.
rosettajs.document.docChildren("No Responses";"% Responses");
// This example returns There are 3 Responses. If the document has one response, the message is 1 Response; if the document has no responses, the message is No Responses.
rosettajs.document.docChildren("No Responses";"1 Response";"There are % Responses.");
(inner) docDescendants(string1, string2, string3) → {string}
Returns the number of descendant documents or subcategories belonging to the current document or category. Only immediate responses count as children. Where docChildren only counts direct descendants, docDescendants counts all descendants, regardless of level.
The parameter descriptions are:
- defaultString The text to return. If a "%" is used in the string, it will be replaced with the number of descendant documents or categories. Example: "% Responses."
- zero-string The text to return if the document or category has no descendants, such as "No Responses."
- one-string The text to return if the document or category has just one descendant, such as "One Response."
Name | Type | Description |
---|---|---|
string1 | string | If this is the only argument, it is the defaultString. If there are more than two arguments, this is the zero-string. |
string2 | string | If there are two arguments, it is the defaultString. If there are three arguments, this is the one-string. |
string3 | string | This is the defaultString. |
- Source
- See
- For further information, see hcltechsw.com
The return value depends on how you call docDescendants:
- numDescendants If docDescendants is called with no parameters, then the number of descendant documents belonging to the current document or category is returned.
- descendantString If docDescendants is called with one or more parameters, it returns the appropriate string, based on the number of descendant documents belonging to the current document or category.
- Type:
- string
rosettajs.document.docDescendants(); // This example returns 3 if there are 3 responses
// This example returns 3 Responses. The appropriate number is substituted for %. If the document doesn't have any responses, this formula returns 0 Responses.
rosettajs.document.docDescendants("% Responses");
// This example returns 3 Responses. This time, if the document doesn't have any responses, the formula returns the message No Responses.
rosettajs.document.docDescendants("No Responses";"% Responses");
// This example returns There are 3 Responses. If the document has one response, the message is 1 Response; if the document has no responses, the message is No Responses.
rosettajs.document.docDescendants("No Responses";"1 Response";"There are % Responses.");
(inner) docFields()
Returns a list of all the fields in a document.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) docLength()
Returns the approximate size of a document in bytes.
- Source
No plans to implement
- Type
- Error
(inner) docLevel()
Returns a text string that represents the level of the document or category.
- Source
- See
- For further information, see hcltechsw.com
The level of the document or category.
rosettajs.Document.docLevel(); // This example of a main document in a category returns 2
rosettajs.Document.docLevel; // This example of a response document in a category returns 3
(inner) docLock()
Locks, unlocks, returns the locked status of the current document, or indicates if a database has document locking enabled.
- Source
no plans to implement
- Type
- Error
(inner) docMark()
In an agent that runs a formula, indicates whether or not you want to save the changes to a document.
- Source
No plans to implement
- Type
- Error
(inner) docNumber(separatoropt)
Returns a string representing the entry number of the current document or category. For example, 2.3 indicates that the document is the third entry following the second entry.
Name | Type | Attributes | Description |
---|---|---|---|
separator | string | <optional> | Optional. Indicates a separator to be used in the document number instead of "." (period); must be one character. An empty string (""), Tells the function to return the least significant item of the document number (in other words, its rightmost component). |
- Source
- See
- For further information, see hcltechsw.com
The value that represents the document number of the document or category in the view.
rosettajs.Document.docNumber(); // This example returns 37.1.3 for entry 37.1.3
rosettajs.Document.docNumber("-"); // This example returns 37-1-3 for entry 37.1.3
rosettajs.Document.docNumber(""); // This example returns 3 for entry 37.1.3
(inner) docOmmittedLength()
Returns the approximate number of bytes a truncated document lost during replication. The bytes are the total number of bytes per attachment, OLE object, large rich text field, or non-summary items that were too large, according to the replication settings for the database, to be replicated.
- Source
no plans to implement
- Type
- Error
(inner) docParentNumber(separatoropt) → {string}
Returns a string that represents the entry number of the parent view entry. Both the current view entry and the parent can be either documents or categories.
Name | Type | Attributes | Description |
---|---|---|---|
separator | string | <optional> | Optional. Indicates a separator to be used in the parent document number instead of "." (period); must be one character. An empty string (""), Tells the function to return the least significant item of the parent document number (in other words, its rightmost component). |
- Source
- See
- For further information, see hcltechsw.com
The value that represents the parent document number of the document or category in the view.
- Type:
- string
rosettajs.Document.docParentNumber(); // This example returns 37.1 for entry 37.1.3
rosettajs.Document.docParentNumber("-"); // This example returns 37-1 for entry 37.1.3
rosettajs.Document.docParentNumber(""); // This example returns 1 for entry 37.1.3
(inner) docSiblings() → {string}
Returns a string that represents the total number of entries at the same level as a view entry (document or category). The returned total includes the document itself. For example, if the document is entry 8.2, and entries 8.1, 8.3, and 8.4 also exist, then there are four document siblings.
- Source
- See
- For further information, see hcltechsw.com
The number of entries at the same level as the document or category.
- Type:
- string
// Returns Response 1 of 4 to Current Vacation Policy if the document is one of four responses to a document with the string Current® Vacation Policy in the Topic field
if (voltmx.rosettajs.Document.isNewDoc()) {
return "New Document";
} else {
return "Response " + voltmx.rosettajs.Document.docNumber(" ") + " of " + voltmx.rosettajs.Document.docSiblings() + " to " + voltmx.rosettajs.Document.getField("Topic");
}
(inner) documentUniqueID() → {string}
The universal ID, which uniquely identifies a document across all replicas of a database. In text format, the universal ID is a 32-character combination of hexadecimal digits (0-9, A-F).
The universal ID is also known as the unique ID or UNID.
- Source
- See
- For further information, see www.hcltechsw.com
- Type:
- string
(inner) emptyTrash()
Deletes documents marked for deletion in a database.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) formLanguage()
Returns the language of the current form.
- Source
no plans to implement
- Type
- Error
(inner) formTestDocument()
Creates a document using the current form or Page, so you can test its fields, formulas, and scripts.
- Source
no plans to implement
- Type
- Error
(inner) getField(fieldName) → {*}
Returns the value of a specified field.
Name | Type | Description |
---|---|---|
fieldName | * |
- Source
- See
- For further information, see www.hcltechsw.com
value
- Type:
- *
(inner) getFieldType(fieldName) → {*}
Returns the type of a specified field.
Name | Type | Description |
---|---|---|
fieldName | * | uses current document |
- Source
field type - possible return values - 'string', 'number', 'date', 'richtext', 'string[]', 'number[]', 'date[], 'richtext[]', and []'
- Type:
- *
(inner) getFocusTable()
Returns the name, current row, or current column of the table that is in focus.
- Source
No plans to implement
- Type
- Error
(inner) hardDeleteDocument()
In an agent that runs a formula, @HardDeleteDocument permanently removes the document currently being processed from the database if the database has soft deletions enabled. If the database does not have soft deletions enabled, @HardDeleteDocument performs the same action as @DeleteDocument.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) inheritedDocumentUniqueID()
The unique ID of the current document's inheritance parent. See @documentUniqueID for a description of unique IDs.
- Source
No plans to implement
- Type
- Error
(inner) isAvailable(field)
Checks a document for the existence of a field.
Name | Type | Description |
---|---|---|
field | * | The field to check |
- Source
- See
- For further information, see www.hcltechsw.com
True indicates that the field is contained in the document. False indicates that the field is not contained in the document.
// This formula returns the value of the Dept field if it exists in the document, otherwise it returns Consultant
if (voltmx.rosettajs.Document.isAvailable("Dept")) {
return voltmx.rosettajs.Document.getField("Dept");
} else {
return "Consultant";
}
// This formula returns the value of the field named Topic if it exists in the document, otherwise it returns the value contained in the field named Subject.
if (voltmx.rosettajs.Document.isAvailable("Topic")) {
return voltmx.rosettajs.Document.getField("Topic");
} else {
return voltmx.rosettajs.Document.getField("Subject");
}
// This formula, when added to a hotspot button, checks for the existence of the Priority field in a form, then sets its value if found or creates a new Priority field and sets its value, if not found
if (voltmx.rosettajs.Document.isAvailable("Priority")) {
return voltmx.rosettajs.Document.setField("Priority", "High");
} else {
return voltmx.rosettajs.Document.setField("Priority", "Medium");
}
(inner) isCategory(trueStringopt, falseStringopt)
Returns a specified string if the current document of a view is defined as a category.
Name | Type | Attributes | Description |
---|---|---|---|
trueString | string | <optional> | A string to return if an item in the view row is a category. |
falseString | string | <optional> | A string to return if no item in the row is a category. |
- Source
- See
- For further information, see hcltechsw.com
If no parameters are specified, the function returns an asterisk (*) if the current document is a category. Otherwise returns an empty string. If trueString is specified, returns trueString instead of asterisk (*). If falseString is specified, returns falseString instead of an empty string.
// This example returns * if the row is a category, or nothing if the row is not a category.
voltmx.rosettajs.isCategory();
// This example returns C if the row is a category, or nothing if the row is not a category.
voltmx.rosettajs.isCategory("C");
// This example returns Y if the row is a category, or N if the row is not a category.
voltmx.rosettajs.isCategory("Y", "N");
(inner) isDocBeingEdited()
Checks the current status of the document and returns 1 (True) if the document is being edited; otherwise returns 0 (False).
- Source
No plans to implement
- Type
- Error
(inner) isDocBeingLoaded()
Checks the current status of the document and returns 1 (True) if the document is being loaded into memory for display; otherwise returns 0 (False).
- Source
No plans to implement
- Type
- Error
(inner) isDocBeingMailed()
Checks the current status of the document and returns 1 (True) if the document is being mailed; otherwise, returns 0 (False).
- Source
No plans to implement
- Type
- Error
(inner) isDocBeingRecalculated()
Checks the current status of the document and returns 1 (True) if the document is being recalculated; otherwise, returns 0 (False).
- Source
No plans to implement
- Type
- Error
(inner) isDocBeingSaved()
Checks the current status of the document and returns 1 (True) if the document is being saved; otherwise, returns 0 (False).
- Source
No plans to implement
- Type
- Error
(inner) isDocTruncated()
Indicates whether the current document has been truncated.
- Source
no plans to implement
- Type
- Error
(inner) isNewDoc()
For a document being edited, indicates if the document has been saved to disk.
- Source
- See
- For further information, see www.hcltechsw.com
1 (True) if the document being edited has not yet been saved to disk. Returns 0 (False) if the document has been saved.
(inner) isResponseDoc()
Indicates whether a document is a response to another document.
- Source
- See
- For further information, see hcltechsw.com
Returns true if the document is a response document. Returns false if the document is not a response document. Returns false for new documents, since @IsResponseDoc doesn't recognize a document type until after the document is saved
// Returns Response if the document is a response; Topic if the document is not a response.
if (voltmx.rosettajs.Document.isResponseDoc()) {
return "Response";
} else {
return "Topic";
}
(inner) isUnavailable(field)
Indicates whether a field name exists in a document.
CAUTION: Do not confuse @IsUnavailable with @Unavailable. @Unavailable deletes fields and can cause serious damage if used unintentionally in place of @IsUnavailable.
Name | Type | Description |
---|---|---|
field | * | The field to check. |
- Source
- See
- For further information, see hcltechsw.com
True indicates that the field is not contained in the document. False indicates that the field is contained in the document.
// Returns Consultant if the field Dept does not exist; if Dept does exist, the value contained in Dept is returned.
if (voltmx.rosettajs.Document.isUnavailable("Dept")) {
return "Consultant";
} else {
return voltmx.rosettajs.Document.getField("Dept");
}
(inner) moveToTrash()
Marks the currently selected document for deletion.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) noteID()
The ID number of the current document.
- Source
No plans to implement
- Type
- Error
(inner) openInNewWindow()
Opens the specified document within a new window.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) pickList()
Displays a modal window that contains either:
- A view you specify from which the user can select one or more documents. @pickList returns a column value from the selected document(s).
- A dialog box, displaying information from all available Domino® Directories. The user can select one or more person, group, server, room, or resource names, and @pickList returns those names.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) policyIsFieldLocked()
Indicates whether a field is locked by an administration policy and cannot be modified.
- Source
No plans to implement
- Type
- Error
(inner) prompt(style, title, promptStringopt, defaultChoiceopt, choiceListopt)
Get html to generate a prompt.
Name | Type | Attributes | Description |
---|---|---|---|
style | The type of prompt to generate | ||
title | The title for the prompt | ||
promptString | <optional> | Optional. Text to display with the prompt | |
defaultChoice | <optional> | Optional. Default choice to select when the prompt is displayed. | |
choiceList | <optional> | Optional. The list of avaliable choices |
- Source
- See
- For further information, see www.hcltechsw.com
A promise that will inject the code for the prompt into the document.
(inner) removeFromFolder()
Removes the selected document from the current folder.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) responses() → {number}
Returns the number of responses (in the current view) to the document.
- Source
- See
- For further information, see hcltechsw.com
value. The number of responses to the document.
- Type:
- number
// Returns 5 if there are five responses to the document.
voltmx.rosettajs.responses();
// Returns the string "No one has responded to this document" if there are no responses to the current document; otherwise a blank is returned.
if (voltmx.rosettajs.responses() === 0) {
return "No one has responded to this document";
} else {
return " ";
}
(inner) setField(fieldName, value)
Assigns a value to a field stored within a document (use @set for temporary variables). This is similar to using the FIELD keyword, except that @setField can be used within another @function. If the field does not exist, this command creates it and applies the specified value to it.
Name | Type | Description |
---|---|---|
fieldName | string | The name of a field in the current document. |
value | * | The value to set the field. |
- Source
- See
- For further information, see www.hcltechsw.com
(inner) setTargetFrame()
Allows you to specify a target frame when opening a view, page, or frameset, or when composing or editing a document.
- Source
no plans to implement
- Type
- Error
(inner) showParentPreview()
Displays the parent document preview pane.
- Source
no plans to implement
- Type
- Error
(inner) showProperties()
Displays the Properties box for the currently selected Notes® object. For example, if a document is selected in a view, displays the document Properties box; if a field is selected on a form, displays the field Properties box.
- Source
no plans to implement
- Type
- Error
(inner) switchForm()
Changes the form used to display the current document.
- Source
no plans to implement
- Type
- Error
(inner) unavailable()
Deletes the value of an editable field.
- Source
No plans to implement
- Type
- Error
(inner) undeleteDocument()
In a database with "Allow soft deletions" selected, this command restores a deleted document.
- Source
- To Do
- this needs to be implemented
method not implemented
- Type
- Error
(inner) v3EditNextField()
In a document in Edit mode, moves the insertion point to the next editable field.
- Source
no plans to implement
- Type
- Error
(inner) v3EditPrevField()
In a document in Edit mode, moves the insertion point to the first editable field.
- Source
no plans to implement
- Type
- Error
(inner) whichFolders()
Returns the names of the folders containing the current document.
- Source
no plans to implement
- Type
- Error