BBjFormatMappingAction::getFormat

Description

In BBj 8.0 and higher, this method returns the format string.

Syntax

Return Value

Method

string

getFormat()

Parameters

None.

Return Value

Returns the format string used for mapping values.

Remarks

See BBjRecordSet::createFormatMappingAction for the syntax of the format string.

Example

GOSUB SetupRecordSets
action! = UserRS!.createFormatMappingAction("[LocationCode = {0}].")
? "type: ",action!.getType()
? "format: ",action!.getFormat()
end

SetupRecordSets:
    UserRS! = BBJAPI().createMemoryRecordSet("NAME:C(100* = 10),LOCATION:C(1)")
    Data! = UserRS!.getEmptyRecordData()
    Data!.setFieldValue("NAME", "John Doe")
    Data!.setFieldValue("LOCATION", "1")
    UserRS!.insert(Data!)
    Data! = UserRS!.getEmptyRecordData()
    Data!.setFieldValue("NAME", "Jane Smith")
    Data!.setFieldValue("LOCATION", "3")
    UserRS!.insert(Data!)
    Data! = UserRS!.getEmptyRecordData()
    Data!.setFieldValue("NAME", "Jane Doe")
    Data!.setFieldValue("LOCATION", "2")
    UserRS!.insert(Data!)
    Data! = UserRS!.getEmptyRecordData()
    Data!.setFieldValue("NAME", "Dr Droopy")
    Data!.setFieldValue("LOCATION", "0")
    UserRS!.insert(Data!)
return

See Also

BBjAPI

BBjRecordSet

 

   BBjRecordSet::addMapping

   BBjRecordSet::createFormatMappingAction

BBjErrorMappingAction

Working with RecordSet Mappings

Java's Message Format

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.