DatasheetElement.getColumnsForCustomQuery (Method)
Returns zero or more structures, each containing information about the information in datasheet columns; for example, the column's type (standard or action), name, and so on.
Returns:
DatasheetElement_GetColumns_Result (query)
Each row of the returned query results has the following fields:
Field Name | Type | Description |
---|---|---|
ColumnID | PlainText_NonNull | The column's ID. If this is a simple form or a custom element, this is the field's numeric ID. Otherwise, this is a string that is the same as the 'Name' member. |
ColumnType | DatasheetColumnType | The column's type, which is 'Standard' or 'Action'. |
HeaderName | PlainText_255 | The column's header text. |
Name | PlainText_NonNull | The column's name. |
Arguments:
Name | Type | Required | Description |
---|---|---|---|
datasourceName | PlainText_NonNull | Required | The name of a ColdFusion data source. |
sqlQuery | ValidSQLSelectStatement | Required | The SQL query that CommonSpot will run when it creates 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. |
ignoreWhereClause | Boolean | Optional. Defaults to '0'. | Boolean value when true, any conditions specified in the Where clause that are dependent on dynamic variables will not be resolved. |
Context:
License Requirements | Datasheet |
Permission Requirements | ContributorOrServerCode |
Deny Context | None |
Require Context | None |
Author Lock | (not required) |
Transaction Logging | Transaction logging is disabled for this method |
Customization | This method may be customized at the site level |
Error Codes:
Code | Error Message |
---|---|
78003 | '$1' is not permitted in the query statement. You can only use SELECT statements. |
78005 | CommonSpot could not execute the specified query. Please check your syntax and try again. $1. |
Notes:
None