- ⌂ Object Methods
- Methods
Object Methods
In addition to the Query Functions, the following object methods can be called on an object to access the result of an object's method call. Object method syntax is similar to the query functions, except they are preceded by a dot, even if no cPath field precedes it.
- .ENUM(Field) - Access the Choices Title that corresponds to the specified field's value.
- .KEY() - Access the Object Key.
- .SUMMARY() - Access the Object Summary.
- .DESCRIPTION() - Access the Object Description.
- .IN_FOLDER() - Determine if the Object is in a given folder.
- .KEYWORDS() - Access the Object Keywords.
- .POSITION_IN() - Access the Object's position in a given folder or field.
Each of these object methods can be overridden with a custom content type method of the same name, except FOLDER_IN() and POSITION_IN(). For example a content type for Contacts could define a Summary method that returns a string based on the cScript "$LastName, $FirstName".
A future version of webCOMAND will allow custom object methods to be defined. Custom object methods will be marked as "pre-cached" methods, which means they are executed when a new object is created or an existing object is updated, so the result can be cached and efficiently accessed at query time.