SBM ModScript Reference → Programming SBM ModScript → Object Types → AppDb → AppDB ColName() Method
Converts the parameter to the form of a valid database column name, using the same transformation applied when you enter logical field names in SBM Composer.
Parameter | Type | Description |
---|---|---|
colname |
string |
Base name of field or column (without "TS_"). Can contain spaces, punctuation, and mixed case. |
Type | Description |
---|---|
string |
A column name in legal database form, containing only upper case letters and underscores, prefixed with "TS_". |
SBM ModScript version: 11.3.
There is no database lookup of actual field or column names; it is a simple text transformation. For example, given "submit date?", this function returns "TS_SUBMIT_DATE". The "TS_" is prepended, alphanumeric characters are converted to uppercase, spaces are converted to underscores, and other characters are omitted.
This function provides a measure of safety when working with column names, because the output is guaranteed to be of a legal form. However, because logical names can be changed at any time after a column's creation, passing a field's logical name to this function will not necessarily yield its actual database name. This function can assist an SBM ModScript programmer who recalls a column's "basic" database name but not the exact formatting rules for punctuation and spaces. An alternative to calling this function is to be sure of the exact column name by looking at the field's database name in SBM Composer or opening the database itself to see the desired column.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.