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 |
|
- Introduction to JavaScript in Service Manager
Basic rules of JavaScript
The following rules apply to the basic syntax of JavaScript:
- JavaScript is case-sensitive.
- Statements should end in a semicolon (;).
-
Variables:
- Must be defined before being used. The variable name can contain A – Z, a – z, underscore or digits and must start with a letter or an underscore (“_”).
- Assume the type of the data that is put into the variable. The data type does not have to be explicitly defined
- Are global variables when defined outside of a function, and are available anywhere in the current script context. Variables created within a function are local variables, and can be used only within that function.
- Strings have to be enclosed in quotation marks, either a single or double. For example:
print(”Hello ” + ‘world ‘+ Country.name)
produces the following: Hello world US. - Special characters that are displayed literally must be preceded by a backslash character (\). Quotes within a string can be entered preceded by a backslash as well. See the Core Language Features - Literals - "String literals" section for more information in http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide.
- To increment a variable, such as a = a + 1, you can use a++. You can decrement a variable in the same way, as in a--.
- To enter comments in the script, use "//" to start a single line comment or the combination of "/*" and "*/" to enclose a multi-line comment.
- Values that are not defined as a data type (string, number, Boolean) may be defined as an object, such as Date, Array, Boolean, String, and Number. As an example you could define:
var ArrayList=new Array(”test”, ” this”, ” list”);
. - Dots in HPE Service Manager field names must be replaced by an underscore (_) in JavaScript. For example contact.name becomes contact_name.
- Service Manager field names that are reserved words in JavaScript have to be preceded by an underscore, such as “_class” for the “class” field.
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@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: