Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
JavaScript object: Attachment
The following JavaScript object is unique to HPE Service Manager. This object allows you to create attachments for use with doSOAPRequest methods. You have to manually define the value property of each attachment object. For binary data attachments, you can use the readFile global method to assign the value property. If you need to create multiple attachments for a doSOAPRequest request, you can use the push method to add each Attachment object to a JavaScript array.
Constructor
new Attachment();
Arguments
None
Properties
The following properties are valid for this object:
Property | Data type | Description |
---|---|---|
value | Binary or String | Use this property to store the binary or string data of the attachment. |
len | Integer | This property contains the file size of the attachment in bytes. |
href | String | Use this property to store the unique identifier for the attachment in the SOAP request message. |
action | String | Use this property to store the name of action to take with the attachment in the Service Manager Web Services API. The following options are available:
|
name | String | Use this property to store the file name of the attachment. |
type | String | Use this property to store the MIME type of the attachment. |
attachmentType | String | Use this property to store the attachment type as defined in Service Manager. If present and the property has a value of "img," then the attachment must also have a MIME type of "image/gif". |
stringValue | String | This is a read only property. When the attachment object contains a text value (utf-8 or ascii characters), user can use this property to get the string data of the attachment. The obtained string date then can be printed, concatenated, etc. |
Methods
None
Example
- Assume there are two attachments in the incident IM10005
- Get the existing attachments from the IM10005
- Concatenate these two attachments to a string
- Create a new attachment which contains the concatenated string value
- Insert MyAttachment.txt into IM10005 as a new attachment
This example does the following:
This example requires the following sample data:
- A binary file (for example, an image)
var f = new SCFile( 'probsummary' ); var rc = f.doSelect( 'number = "IM10005"' ); var attachmentObj = f.getAttachments(); var str = ""; for ( var attachment in attachmentObj ) { print("Attachment Name: "+ attachmentObj[ attachment ].name ); print("Attachment Value: "+ attachmentObj[ attachment ].stringValue ); print("Attachment Value Length: "+ attachmentObj[ attachment ].stringValue.length ); print("Attachment HREF: "+ attachmentObj[ attachment ].href ); print("Attachment Type: "+ attachmentObj[ attachment ].type); str+= attachmentObj[ attachment ].stringValue ; } //Create new attachment with a concatenated value print("String Length: "+str.length); var attachObj = new Attachment(); attachObj.type = "text/plain"; attachObj.name = "MyAttachment.txt"; attachObj.value = str; var attachmentID = f.insertAttachment( attachObj ); print("AttachmentID: "+attachmentID);
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-ITSM@hp.com.
Help Topic ID:
Product:
Topic Title:
Feedback: