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 |
|
- Service Manager defined JavaScript objects
- JavaScript object: Attachment
- JavaScript object: Datum
- JavaScript object: Header
- JavaScript object: SCDatum
- JavaScript object: SCFile
- JavaScript method: SCFile.deleteAttachment( attachID )
- JavaScript method: SCFile.deleteAttachments()
- JavaScript method: SCFile.doAction()
- JavaScript method: SCFile.doCount()
- JavaScript method: SCFile.doDelete()
- JavaScript method: SCFile.doInsert()
- JavaScript method: SCFile.doPurge()
- JavaScript method: SCFile.doRemove()
- JavaScript method: SCFile.doSave()
- JavaScript method: SCFile.doSelect()
- JavaScript method: SCFile.doUpdate()
- JavaScript method: SCFile.getAttachment( attachID )
- JavaScript method: SCFile.getattachments()
- JavaScript method: SCFile.getBinary()
- JavaScript method: SCFile.getFirst()
- JavaScript method: SCFile.getLast()
- JavaScript method: SCFile.getLastRC()
- JavaScript method: SCFile.getMessages()
- JavaScript method: SCFile.getNext()
- JavaScript method: SCFile.getPrev()
- JavaScript method: SCFile.getPurgedRowCount()
- JavaScript method: SCFile.getText()
- JavaScript method: SCFile.getType()
- JavaScript method: SCFile.getXML()
- JavaScript method: SCFile.insertattachment()
- JavaScript method: SCFile.isRecord()
- JavaScript method: SCFile.setBinary()
- JavaScript method: SCFile.setFields()
- JavaScript method: SCFile.setOrderBy()
- JavaScript method: SCFile.setRecord()
- JavaScript method: SCFile.updateAttachment( attachObj )
- JavaScript object: SCRecordList
- JavaScript object: XML
- JavaScript object: XMLDate
JavaScript object: SCFile
The following JavaScript object is unique to Service Manager.
With no parameters, the SCFile() constructor creates an empty SCFile object.
With an object parameter, the SCFile() constructor creates an SCFile object containing the provided record, structure, or array. You must enclose table names and arrays in quotation marks.
This object's methods use the Service Manager-defined global return codes.
Constructor
new SCFile() new SCFile(object) new SCFile( object, SCFILE_READONLY )
Arguments
The following arguments are valid for this object:
Argument | Data type | Description |
---|---|---|
object
|
String | The table name, record, structure, or array you want to query or update. |
SCFILE_READONLY
|
Number |
Causes the file object to become read-only. This constant is only supported as a second parameter, with the file name specified as the first parameter. |
Properties
None
Properties
None
Methods
The following methods are valid for this object:
Defined method | Description |
---|---|
deleteAttachment( attachID ) | This method deletes a specific attachment associated with the current file record. |
deleteAttachments() | This method deletes all of the attachments associated with the current file record. |
doAction() | This method executes a method defined on the object. |
doCount() | This method returns the number of records for the provided query. |
doDelete() | This method is synonymous with the doRemove() method. This method simply has a more intuitive name. |
doInsert() | This method inserts an object into the database. |
doPurge() | This method purges a set of records directly in the back-end RDBMS. |
doRemove() | This method removes an object from the database. |
doSave() | This method inserts a record if it is new and updates the record if it already exists. |
doSelect() | This method makes a query. It no longer requires that the first argument be the name of the table if the object is constructed with the name of the table. |
doUpdate() | This method updates the database. |
getAttachment( attachID ) | This method gets a specific attachment associated with the current file record. |
getAttachments() | This method gets all of the attachments associated with the current file record. |
getBinary() |
This method returns the binary representation of a field in a Service Manager file object. |
getFirst() | This method moves to the first record if the object represents a result set. |
getLast() | This method moves to the last record if the object represents a result set. |
getLastRC() | This method returns the last return code generated by the SCFile and SCDatum objects. |
getMessages() | This method returns an array of messages generated by the Document Engine from a previous doAction(). |
getNext() | This method moves to the next record if the object represents a result set. |
getPrev() | This method moves to the previous record if the object represents a result set. |
getPurgedRowCount() | This method retrieves the number of records deleted from a table by the doPurge(). |
getText() | This method returns a text representation of the object. |
getType() | This method returns the object type. |
getXML() | This method returns an XML representation of the object. |
insertAttachment() | This method creates a new attachment associated with the current file record. |
isRecord() | This method checks if an object represents a current table and has a record. |
setBinary() | This method saves binary data to a field in a Service Manager file object. |
setFields() | This method causes any subsequent doSelect() calls to fetch only the specified fields. |
setRecord() | This method sets the field values from a given XML string. |
setOrderBy() | This method causes any subsequent doSelect() call on a SCFile object to fetch only the specified fields by the specified sort sequences of the SCFile Object. |
updateAttachment( attachObj ) | This method updates a specific attachment associated with the current file record. |
Example
This example does the following:
- Creates an SCFile object from the contacts table
- Selects records from this contacts table starting with the letter B
- Displays the contacts matching the select query
This example requires the following sample data:
- A valid query against the contacts table (for example, contact.name # "B")
var q = new SCFile("contacts"); if ( ( q.doSelect( "contact.name # \"B\"" ) ) == RC_SUCCESS ) { print(q.getText()); } else print( "Return code is: " + q.RCtoString );