DatasheetElement.addCustomQueryView (Method)
Creates a datasheet view for displaying the results of a custom query.
Returns:
Void
Arguments:
Name | Type | Required | Description |
---|---|---|---|
pageID | RealPageID_NonBaseTemplate | Required | A page's ID. |
elementID | DatasheetElementInstanceID | Required | The datasheet element's control ID. |
viewName | PlainText_NonNull | Required | The view's name. |
selectedColumnList | PlainText_NonNull_List | Required | A comma-delimited list of a datasheet columns that CommonSpot displays. |
datasourceName | PlainText_NonNull | Required | The name of an existing ColdFusion data source. |
sqlQuery | ValidSQLSelectStatement | Required | The SQL query that CommonSpot will run when it generates a datasheet. |
username | PlainText | Optional. Defaults to an empty string. | A database user name. |
password | PlainText_Secure | Optional. Defaults to an empty string. | The password associated with the 'username' argument. |
viewDescription | PlainText_2000 | Optional. Defaults to an empty string. | The view's description. |
isDefaultView | Boolean | Optional. Defaults to '0'. | Boolean flag indicating if performance reporting is enabled for the current user. |
isPublic | Boolean | Optional. Defaults to '1'. | Boolean flag which when set to true indicates that the view is public. |
Context:
License Requirements | Datasheet |
Permission Requirements | element:Author |
Deny Context | None |
Require Context | AuthoringEnabled |
Author Lock | Required |
Transaction Logging | If transaction logging is enabled at the site level, calls to this method will be logged |
Customization | This method may be customized at the site level |
Error Codes:
Code | Error Message |
---|---|
78002 | Another view with same name already exists for the specified datasheet element. |
78012 | Column '$1' does not exist in the $2. |
78021 | Private views cannot be set as the default view. |
78024 | Only SELECT statements can be specified and no ColdFusion tags are allowed. |
Notes:
None