On 2010 Jun 21, at 22:37, W. D. wrote:
> There might have been some discussion about this
> some time back, but what fields ... would you recommend for all databases?
Every file I create has an "F" table in it. "F" stands for "file", and it's the table where I store everything that's unique to that particular file. The "F" table has only 1 record in it. "F" is cross-linked to every other table in the file by means of a One x One relationship. It's also the place where OTHER files store the default values for new records to be created in one of the tables of the current file.
In addition to all the standard fields in the "F" table, every OTHER table in the file also has a bunch of standard fields. Fortunately, FMPA makes it really easy to copy and paste such fields from one table to another.
Here's my standard set of fields, using tabs that may or may not show up in your e-mail:
TABLE "F" (F = file; exists in every file, contains only 1 record, linked to all tables in the file via One = One relationship.)
--- FILE --- Text Global
File Text Global
Version Text Global
Table List Text Global
MIT Text Global
(Note: MIT = most important table)
UserID Number Global, Always Validate, Numeric Only
Subtitle Text Global
(Note: available for use on output layouts)
LogoH Container Global
(Note: H = high; aspect ratio of 2V x 1H)
LogoS Container Global
(Note: S = square; aspect ratio of 1V x 1H)
LogoW Container Global
(Note: W = wide; aspect ratio of 1V x 2H)
--- TABLE --- Text Global
One Calculation Indexed, = 1
Table Calculation Unstored, = Get ( LayoutTableName )
Layout Calculation Unstored, = Get ( LayoutName )
Orientation Text Global
(Note: Set to "High" or "Wide" by page-setup scripts.)
--- SAVERS --- Text Global
File Saver Text Global
Table Saver Text Global
Layout Saver Number Global, Always Validate, Numeric Only
Seq Saver Number Global, Always Validate, Numeric Only
Step Saver Number Global, Always Validate, Numeric Only
LoopEnd Saver Number Global, Always Validate, Numeric Only
Object Saver Text Global
Found Saver Number Global, Always Validate, Numeric Only
(Note: saves the number of records currently found prior to entering Find mode)
Phone LCA Saver Number Global, Always Validate, By Value List
(Note: LCA = local calling area; value list is "One", has only 1 value, "1", displayed as checkbox.)
Phone AC Saver Number Global, Always Validate, Numeric Only, Maximum, Message
(Note: AC = area code; maximum = 3 digits)
--- LINK CODES --- Text Global
--- DEFAULTS --- Text Global
BeSeq Default Number Global, Always Validate, Numeric Only
(Note: BeSeq = being sequence number; beings are either people or organizations.)
Source Default Text Global
Date Default Date Global, Always Validate, 4-Digit Year Date
Tech Type Default Text Global, Always Validate, By Value List
(Note: Value list is "Tech Types" = "Phone", "Email", "Web".)
Usage Type Default Text Global, Always Validate, By Value List
(Note: Value list is "Usage Types" = "home", "work", "cell", "fax", "car", "pager", "free", "alt", "summer", "winter", "-", "mother", "father", "sister", "brother", "-", "main", "backup", "emerg", "-", "pers", "corp", "educ", "govt", "mil", "NGO".)
Phone LCA Default Number Global, Always Validate, By Value List
(Note: Value list is "One", has only 1 value, "1", displayed as checkbox.)
Phone AC Default Number Global, Always Validate, Numeric Only, Maximum, Message
Phone No Default Text Global, Always Validate, Maximum, Message
(Note: Maximum = 8 bytes)
Phone Ext Default Text Global, Always Validate, Maximum
(Note: Maximum = 5 bytes)
Network Default Text Global
(Note: can contain either an eddress or an URL, depending on "Tech Type")
Notes Default Text Global
--- GLOBALS --- Text Global
Eddress Multiple Text Global
(Note: used to paste in a bunch of individual eddresses prior to copying them for the "To:" line of an e-mail)
Website Text Global
(Note: "Set Field" used to insert a single URL to be displayed in a Web Viewer window on a separate layout.)
TYPICAL DATA TABLE, let's say for the table "Beings"
--- TABLE --- Text Global
One Calculation Indexed, from Beings, = 1
Current Calculation Unstored, from Beings, = Get ( RecordNumber )
Found Calculation Unstored, from Beings, = Get ( FoundCount )
TRex Calculation Unstored, from Beings, = Get ( TotalRecordCount )
RecSho Calculation Unstored, from Beings, = Current & " / " & Found & " / " & TRex & " / " & F::Orientation
Bkg Calculation Unstored, from Beings, = If ( Int ( Current / 5 ) = Current / 5; UF::Azure; "" )
(Note: Bkg = background; every 5th line is highlighted)
--- RECORD --- Text Global
BeSeq Number Indexed, Auto-Enter Serial, Can't Modify Auto, Always Validate, Required Value, Unique, Numeric Only
Created Date Indexed, Creation Date, Can't Modify Auto, Always Validate, 4-Digit Year Date
Updated Date Indexed, Modification Date, Always Validate, 4-Digit Year Date
Obsolete Date Indexed, Always Validate, 4-Digit Year Date
Active Calculation Indexed, from Beings, = If ( IsEmpty ( Obsolete ); 1; "" )
Active Bkg Calculation Unstored, from Beings, = If ( not IsEmpty ( Obsolete ); UF::Caramel; "" )
Tag Number Indexed, Always Validate, By Value List
(Note: Value list is "One", has only 1 value, "1", displayed as checkbox. This field is available for users to tag temporary subsets of data for easy finding.)
Notes Text Indexed
CurRecDesc Calculation Unstored, from Beings, = "current \"" & Get ( LayoutTableName ) & "\" record, for " & Name Full
(Note: current record description, used in Tooltips on buttons; changes for every table)
Source Text Indexed, Auto-Enter Calculation (= F::Source Default)
--- LINK CODES --- Text Global
--- PASSTHRUS --- Text Global
(Note: calculation fields that assemble data fields from this table for use in other tables)
--- DATA --- Text Global
(Note: Only the very simplest tables have only this single heading for the data fields; most of them have multiple headings to identify major groupings of fields, such as NAME, ADDRESS, FINANCE, etc.)
--- DEVELOPER --- Text Global
Calc Calculation Indexed, from Beings, = PatternCount ( Name Full, "⁋" )
(Note: This is just an example of the kind of calculation one might use; it changes depending on the developer's current needs.)
Length Calculation Indexed, from Beings, = Length ( RightWords ( Addr Str Name; 1 ) )
(Note: This is just an example of the kind of calculation one might use; it changes depending on the developer's current needs.)
Temp Text Indexed
--- SUMMARIES --- Text Global
C Rex Summary Count of One
|