CustomElement (Component)
The CustomElement object lets you create and manage custom elements, which are elements that are not bundled with CommonSpot. Some of the object's methods let you manage an element's ownership and state. Others let you define the element's fields and data browser properties. Many of the object's methods let you obtain information about element fields, properties, the HTML CommonSpot uses to display the element, and the like.
Methods marked below with [L] may be logged at the site level (if transaction logging is licensed and enabled by the administrator)
Methods marked below with [C] may be customized at the site level
Methods:
changeOwner [L] [C] | Changes a custom element's owner. |
changeState [L] [C] | Change the state of a custom element to one of the following: 'Active', 'Deleted', and 'Inactive'. |
createAuthorFilterStatement [C] | Returns a string describing an 'author' filter statement. An 'author' statement is in the form AuthorID {operator} {value}, where the value is a Contributor ID, or comma delimited list of Contributor IDs. Note the returned string is an internal string format so only use this method to create the statement string. One or more filter statements can then be combined to create a full QueryEngineFilter. |
createDateFilterStatement [C] | Returns a string describing a 'date' filter statement. A 'date' statement is in the form {field} {operator} {value}, where the field is a date-based field, and the value is a datetime in the format 'yyyy-mm-dd hh:mm:ss'. Note the returned string is an internal string format so only use this method to create the statement string. One or more filter statements can then be combined to create a full QueryEngineFilter. |
createFTBFilterStatement [C] | Returns a string describing a 'formatted text block' filter statement. A 'formatted text block' statement is in the form {field} {operator} {value}, where the field is a formatted text block field, and the value is a string. Note the returned string is an internal string format so only use this method to create the statement string. One or more filter statements can then be combined to create a full QueryEngineFilter. |
createQueryEngineFilter [C] | Returns a Query Engine Filter object, which is an array of one or more strings describing the filter. This array can then be passed to CustomElement.getRecordsFromSavedFilter() to retrieve custom element records. |
createStandardFilterStatement [C] | Returns a string describing a 'standard' filter statement. A 'standard' statement is in the form {field} {operator} {value}, where the field is any custom element field (besides a date, taxonomy, formatted text block, or author) and the value is a single item not a list of items. Note the returned string is an internal string format so only use this method to create the statement string. One or more filter statements can then be combined to create a full QueryEngineFilter. |
createTaxonomyFilterStatement [C] | Returns a string describing a filter statement for 'taxonomy' based statements. A 'taxonomy' statement is in the form {field} {operator} {value} {includeChildTerms}, where the value is either a single term or a list of terms, and includeChildTerms is Yes or No. Note the returned string is an internal string format so only use this method to create the statement string. One or more filter statements can then be combined to create a full QueryEngineFilter. |
getDataBrowserFields [C] | Returns one or more structures, each containing information about global custom element fields that will be displayed in a data browser's window; for example, a field's name, description, is it a sort column, and so on. |
getDataBrowserProperties [C] | Returns a structure whose members describe data browser properties such as the number of records per page, the sort column, and so on. |
getFields [C] | Returns zero or more structures, each containing information about a custom element's fields such as its label, name, position, and the like. |
getFieldsForMapping [C] | Returns a query of fields that can be supplied for mapping the render handler defined fields' values. |
getInfo [C] | Returns a structure containing information about a custom element; for example, the field's owner, a category name, description, type, and so on. |
getList [C] | Returns a structure containing information about a custom element; for example, 'Owner', 'CategoryName', 'Description', 'Type', and so on. |
getMiscProps [C] | Returns a structure containing general properties for a custom element; for example, 'EnableFullTextIndexing', 'SearchCollection,' ViewingPageFullPath'. |
getOwner [C] | Returns one or more structures, each containing the name and owner ID of an element's owner. |
getOwnerID [C] | Returns the ID of the custom's element's owner, which is either a user or group ID. |
getRecords [C] | Returns a query populated with the manually selected Custom Element records for the specified custom element element instance. The query will return only columns specified in the ColumnList. |
getRecordsFromFilter [C] | Returns a query populated with custom element records from the filter. The query will return only columns specified in the ColumnList. |
getRecordsFromSavedFilter [C] | Returns a query populated with Custom Element records from the specified Custom Element Records based on the specified filter. The query will return only columns specified in the ColumnList. To construct the filter call CustomElement.createQueryEngineFilter(). |
getStats [C] | Returns a structure containing the statistics for the custom element. |
import [C] | Imports a custom element and sets its category. |
saveDataBrowserProperties [L] [C] | Either creates a new custom element or updates an existing one. |
saveMiscProps [L] [C] | Saves miscellaneous properties for a global custom element; for example, the viewing page's ID, full text indexing, where the indexing information resides, the title field's ID, and the description field ID. |
saveRecords [L] [C] | Save the manually selected records, for the specified custom element in reuse mode. |