Routines for genrec.kb


AddField

File Name

genrec.kb

Syntax

AddField(VR: VRType, FieldName: STRING, DBFieldType: STRING, DefaultVal: STRING);

Parameters

VR - variant record to store values

Fieldname - name of field to add

DBFieldType - type of field

DefaultVal - default value to store in field

Returns

Integer - 1 if field is successfully added to VR

Side Effects

None. Descripton: None.

Description

None

Dialog Forms Called

None


AddTableFields

File Name

genrec.kb

Syntax

AddTableFields(VR: VRType, TBName: STRING)

Parameters

VR - variant record

TBName - table to import

Returns

Integer - 1 if all columns imported successfully

Side Effects

None. Globals Changed: None.

Description

This function will import a table at run time and set up a generic record to resemble the table.

Dialog Forms Called

None


ConvertRecordsToStringList

File Name

genrec.kb

Syntax

ConvertRecordsToStringList(VR: VRType, Condition: STRING, numColumns: INTEGER, reclist: LIST OF STRING

Parameters

VR - flexible record

Condition - condition to use

numColumns - number of columns in the table

reclist - new list of string

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Reads multiple records from a database table and stores values in VR. The function then converts these records to a list of string.

Dialog Forms Called

None


GetFieldAsDate

File Name

genrec.kb

Syntax

GetFieldAsDate(VR: VRType, FieldName: STRING)

Parameters

VR - flexible record

FieldName - name of field to get

Returns

Date

Side Effects

None. Globals Changed: None.

Description

Gets a field in the generic record.

Dialog Forms Called

None


GetFieldAsInt

File Name

genrec.kb

Syntax

GetFieldAsInt(VR: VRType, FieldName: STRING)

Parameters

VR - flexible record

FieldName - name of field to get

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Gets a field in the Generic Record

Dialog Forms Called

None


GetFieldAsString

File Name

genrec.kb

Syntax

GetFieldAsString(VR: VRType, FieldName: STRING)

Parameters

VR - flexible record

FieldName - name of field to get

Returns

String

Side Effects

None. Globals Changed: None.

Description

Gets a field in the Generic Record

Dialog Forms Called

None


GetFieldAsTime

File Name

genrec.kb

Syntax

GetFieldAsTime(VR: VRType, FieldName: STRING)

Parameters

VR - flexible record

FieldName - name of field to get

Returns

Time

Side Effects

None. Globals Changed: None.

Description

Gets a field in the Generic Record.

Dialog Forms Called

None


GetFieldNames

File Name

genrec.kb

Syntax

GetFieldNames(VR: VRType)

Parameters

VR - flexible record

Returns

List of String

Side Effects

None. Globals Changed: None.

Description

Returns a list of all fields that are in the Generic Record.

Dialog Forms Called

None


GetFieldVal

File Name

genrec.kb

Syntax

GetFieldVal(VR: VRType, FieldName: STRING)

Parameters

VR - flexible record

FieldName - name of field to get.

Returns

String

Side Effects

None. Globals Changed: None.

Description

Gets a field in the generic record.

Dialog Forms Called

None


GetMetaField

File Name

genrec.kb

Syntax

GetMetaField(VR: VRType, FieldName: STRING, MetaData, Data: LIST OF STRING)

Parameters

VR - flexible record

FieldName - name of field to get.

MetaData - attribute name list

Data - attribute value list

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Updates a value in VR based on a MetaData value.

Dialog Forms Called

None


InsertToTable

File Name

genrec.kb

Syntax

InsertToTable(VR: VRType)

Parameters

VR - Flexible Record

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Inserts a row in a database table based on values in VR.

Dialog Forms Called

None


ReadFromDatabaseTable

File Name

genrec.kb

Syntax

ReadFromDatabaseTable(VR: VRType, Condition: STRING)

Parameters

VR - flexible record

Condition - condition to use

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Reads one record from a database table and stores values in VR.

Dialog Forms Called

None


SetFieldVal

File Name

genrec.kb

Syntax

SetFieldVal(VR: VRType, FieldName, NewVal: STRING)

Parameters

VR - flexible record

FieldName - name of field to set.

NewVal - value to set

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Sets a field in the generic record.

Dialog Forms Called

None


SetMetaField

File Name

genrec.kb

Syntax

SetMetaField(VR: VRType, FieldName: STRING, MetaData, Data: LIST OF STRING)

Parameters

VR - flexible record

FieldName - Name of field to get

MetaData - attribute name list

Data - Attribute value list

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Adds an entry to a metadata data list from a single field.

Dialog Forms Called

None


UpdateFromWindow

File Name

genrec.kb

Syntax

UpdateFromWindow(whdl: WINDOW, VR: VRType)

Parameters

whdl - window from which to update

VR - flexible record

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Updates a generic record based on window control values.

Dialog Forms Called

None


UpdateToTable

File Name

genrec.kb

Syntax

UpdateToTable(VR: VRType, Condition: STRING)

Parameters

VR - flexible record

Condition - condition to use

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Updates row(s) in a database table based on values in VR.

Dialog Forms Called

None


UpdateToWindow

File Name

genrec.kb

Syntax

UpdateToWindow(whdl: WINDOW, VR: VRType)

Parameters

whdl - window from which to update

VR - flexible record

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Updates window based on a generic record.

Dialog Forms Called

None


WriteToDatabaseTable

File Name

genrec.kb

Syntax

WriteToDatabaseTable(VR: VRType, Condition: STRING)

Parameters

VR - flexible record

Condition - condition to use

Returns

Integer

Side Effects

None. Globals Changed: None.

Description

Inserts/updates row(s) in a database table based on values. in VR

Dialog Forms Called

genrec.dfc[genrec]