SBM ModScript Reference → Programming SBM ModScript → Shell Properties → Shell Property Descriptions → Database Import Shell Properties
Database import shell property accessors 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).
int (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:
var Log = Shell.ImportLog(); Log.Message ( Log.MINIMAL, "Message Logged at Minimal Logging Level" ); Log.Message ( Log.AVERAGE, "Message Logged at Average Logging Level" ); Log.Message ( Log.VERBOSE, "Message Logged at Verbose Logging Level" );
string (input). Name of the current Import Option Set record.
dictionary (key(string), object (DbImport) (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:
var source = Shell.Source(); for ( dbImport : source ) { //do something with dbImport }
Value
DbImport. DbImport is a class 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–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.