SBM AppScript Reference → Programming SBM AppScript → Shell Properties → Shell Property Descriptions → Database Import Shell Properties
Database import shell properties are defined when importing data from a generic ODBC database.
string (input). Specifies the operation of the data import on the current item. Possible values are add (add a new item) and update (update an existing item).
integer (input). ID of the current Import Option Set record.
TSLog object (input/output). The TSLog object is a complex object used to log messages into the DBImport log file. The logging levels defined in the TSLog object are minimal, average, and verbose. The message function defined in the TSLog object logs messages directly into the DbImport log using the following syntax:
Message ( Logging Level ( Int ), Message ( String ) )
For example:
Dim Log Set Log = Shell.ImportLog Call Log.Message ( Log.MINIMAL, "Message Logged at Minimal Logging Level" ) Call Log.Message ( Log.AVERAGE, "Message Logged at Average Logging Level" ) Call Log.Message ( Log.VERBOSE, "Message Logged at Verbose Logging Level" )
string (input). Name of the current Import Option Set record.
dictionary (key(string), object (DbImportObj) (input).
Key
The key string contains the source column name and optionally the destination (SBM) field ID. Keys that contain only the source column name are unmapped source values available for processing via the script. All mapped keys will use the '.' as a separator followed by the SBM field database name. For example, issuetype.ISSUETYPE, state.STATE, title.TITLE, color.COLOR_SINGLE_SELECTION, issueid.ISSUEID, id.
The following example will iterate through all values contained within the Source Dictionary:
Dim DbImportObjKey For Each DbImportObjKey in Shell.Source Dim DbImportObj Set DbImportObj = Shell.Source.Item( CStr( DbImportObjKey ) ) Next
Value
DbImportObj. The DbImportObj is a complex scripting object that contains values representing the source database values:
SrcColumn
string. The database column from the source database.
SrcType
integer. The database column type from the source database. The following database data types are supported:
SrcData
string/integer. The actual data from the source database.
SrcLabel
string. If an "Int" type value maps to a reference table, this string value represents the label from the source database.
DestFldId
integer. If mapped, this value represents the destination (SBM) field ID.
AppDB object (input).The source database object.
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.