Issue 55 * August 18th, 2008

FileMaker Pro to Revolution Conversion Part 3
Using Custom Property Sets

by David Simpson

In the previous newsletters we discussed collecting your information from Filemaker to convert your database to Revolution and making the conversion.

Each card in the generated Revolution stack file includes a custom property set named FmPro. This custom property set includes detailed info about the field objects which have been created on the card by FmPro Migrator Developer Edition. This information is expected to be useful for Revolution developers who want to create data entry/validation and data display handlers for each of the fields on the card. Having the fields listed in a custom property set also means that developers don't have to manually type in each of the field object names into their code either. Just loop thru the lines of data in the custom property set to work with the names and data types for each field on the card.

FmPro - customPropertySet Overview

There are 4 customProperties within the FmPro customPropertySet.

Version - customProperty

The Version customProperty defines the version of the customPropertySet schema. The current value for the Version customProperty is 1, this value will change as enhancements are made to the FmPro customPropertySet.

baseTable - customProperty

The baseTable customProperty represents the name of the base table referenced by the original layout. Note: In the initial release, this value does not currently contain a meaningful value.

fieldsList - customProperty

Fields List

The fieldsList is a TAB delimited list providing 19 parameters for each field which has been created on the card. These parameters are shown in the screenshot with sample values and are listed below:

(1) Rev Object Name - The name given to the Revolution field when it was created.
(2) Original FileMaker Pro Field Name - This is the name of the Table Occurrence::Fieldname in the original FileMaker Pro database.
(3) SQL Table Column Name - The converted name of the original field, as it appears in the SQL database.
(4) SQL Table Column Type - The type of data contained in the field, matching the field types for the destination SQL database. Note: Not currently implemented.
(5) Revolution Object Type - The type of Revolution object. Use this object type and its name when referencing the object.
(6) Usage Type - The way in which the object is used on the card, either as a field or a menu. This parameter indicates whether you need to put data into the field (for a field) or into the label of an object (for a menu).
(7) Entry Options Flag - The entry options for entry of data within a field, as defined by the fieldObj flags XML parameter in the original layout. Multiple options may be applied to a field simultaneously. To determine if a particular value is selected, use the bitAND Revolution instruction. See the following screenshot for more details.
(8) Currency Symbol - The symbol used for currency values.
(9) Thousands Separator Symbol - The symbol used to separate thousands, in numeric values.
(10) Decimal Point Symbol - The symbol used for decimal points in numeric values.
(11) Number of Decimal Digits - The number of values displayed to the right of the decimal point symbol
(12) Negative Color (RGB) - The RGB values, separated by commas which should be used for negative numeric values.
(13) True String - The text string used for true values.
(14) False String - The text string used for false values.
(15) Date Separator Char - The symbol used for separating short date values.
(i.e. MM/DD/YYYY).
(16) Date Element Separator1 - The first date separator character string, used when displaying dates in long format.
(17) Date Element Separator2 - The second date separator character string, used when displaying dates in long format.
(18) Date Element Separator3 - The third date separator character string, used when displaying dates in long format.
(19) Time Separator Char - The symbol used for separating time values (i.e. HH:MM:SS)
(20) Time AM String - The suffix string used for displaying AM time values.
(21) Time PM String - The suffix string used for displaying PM time values.

Entry Options Details - (fieldObj flags values)

Multiple entry options can be applied to the same field. To decode these values, use the Revolution bitAND command as follows:

put varFieldEntryOptions bitAnd 4 into tResult 
if tResult = 4 then set the lockText of field Field1_fld to true 

This concludes our tutorial series. If you would like to try FMPro Migrator for yourself, you can read more or click the button below to purchase.

Main Menu What's New