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 global properties
Global properties are predefined properties that are not part of any object. They are names representing values that are globally defined. The core JavaScript language has several global properties, such as NaN (Not a Number), and Service Manager has a number of additional global properties.
There are two categories of Service Manager-defined global properties:
- Query operators
- JavaScript return code properties
Query operators
These operators are used solely for constructing query expressions using the Query object.
Note The Query object has been deprecated, but older JavaScript code within the ScriptLibrary still uses the object.
Query operator | Description |
---|---|
EQ |
Equals to |
LIKE |
Starts with |
NEQ |
Not equal to |
GT |
Greater than |
GE |
Greater or equal to |
LT |
Lower than |
LE |
Lower or equal to |
ISIN |
Is an element in the array |
Example:
var q=new SCFile("probsummary") q.doSelect(new QueryCond("number", EQ, "IM10002"));
JavaScript return code properties
Use these properties (which are represented internally as integer values) to test the values returned by object methods such as SCFile. To print the error message rather than the return code, use the RCtoString function.
Return code | Description |
---|---|
RC_ERROR |
Some other error occurred. Examine the contents of the Messages view or the sm.log file for more information. |
RC_SUCCESS |
The operation succeeded. |
RC_CANT_HAVE |
The operation failed because the resource is unavailable because some other user or process has the resource locked. |
RC_NO_MORE |
No more records are available in the result set. |
RC_DUPLICATE_KEY |
The insert operation failed because the file already contains a record with this unique key value. |
RC_MODIFIED |
The update operation failed because the record was modified by another user or process since you read it. |
RC_DELETED |
The operation failed because the record was deleted by another user or process. |
RC_BAD_QUERY |
The query failed due to incorrect query syntax. |
RC_NOT_AUTHORIZED |
The request operation was not performed due to an authorization failure. Check the permissions associated with the user who submitted the request. |
RC_VALIDATION_FAILED |
The operation failed because the data supplied in a field or the record did not pass validity checks performed by the application. |
RC_UNABLE_TO_WRITE_TO_FILE |
The operation failed. Check to make sure the file name is correct, that the file exists, and that it is not read-only. |
RC_UNABLE_TO_CLOSE_FILE |
The operation failed. Check to make sure the file name is correct, that the file exists, and that it is not read-only. |
RC_UNABLE_TO_DELETE_FILE |
The operation failed. Check to make sure the file name is correct, that the file exists, and that it is not read-only. |
RC_INVALID_FILENAME |
The operation failed because the file name is not valid. |
Example:
var rc = mySCFile.doInsert(); if ( rc == RC_SUCCESS ) { print( "Insert succeeded" ); } else throw( "Error " + RCtoString(rc) + " occurred trying to insert a record" );