Advertising

FileMaker Templates

Need commercial FileMaker development by Murray? - Read this

Introduction

Development and maintenance of complex FileMaker solutions is far easier when you have built your solutions from templates. Because:

You can download my own templates here (the high-level password is colonelklink):

Macintosh: mhcfmtemplates.hqx (437K)
Windows: mhcfmtemplates.zip (322K)

These templates are arranged in 3 folders:

These templates represent a considerable head start when developing FileMaker systems. You are welcome to use them but naturally I accept no liabilities and offer no guarantees. If you use them it would be nice to receive a comment in the guestbook.

The following is both a description of these templates and general advice about FileMaker templates. Be sure to read Murray's FileMaker Advice to learn about basic techniques which should be used in all FileMaker development.

Layouts

The Navigation Box

This set of fields and buttons allows the user to move through the records without having to open the status panel. When in browse mode, the buttons also ensure that the SUB.Process script is called on each record. The panel also includes a [Del] button.

Scripting

SUB.Process

It is sometimes necessary to ensure that data is validated or updated using scripts whenever it is changed. Ensuring that all buttons call this empty script allows the developer to insert such processing in future without having to modify all the button scripts. Therefore, all new Button scripts should be created by duplicating an existing Button script.

N.B. This method will allow the developer to create indexed versions of un-indexable fields for fast finds and extra relationships.

Scripts Menu

The scripts menu should be used as a menu to move between areas in the entire system. This also discourages use of the Window menu.

Special Fields

Sys.Found, Sys.Records

Used by the Navigation Box.

Sys.Creation Date, Sys.Creation Time, Sys Modification Date, etc

Additional Information to help the developer maintain database. Remember, these fields are usually not auto-entered in imported records.

G.Help.Code, G.Help.Applescript

Can be used for context-sensitive help. Specific Help buttons set a Help Code in G.Help.Code and a SUB script then displays the relevant text from the 'System Help' file. Because the FileMaker message box is of limited size, the G.Help.Applescript field can be used to generate an Applescript dialog box. The field already contains the necessary Applescript but needs to be altered to refer to your help file via a relationship.

Sys.StatusCurrentError

Used by scripts to trap errors. See the 'BUTTON.Find' script for example.

Sys.File Name

see 'Global Fields' below.

LINK

This calculation field is always 1. It can be used by a relationship to get at values in the System Constants file.

Global Fields

'Sys.File Name' is used on layout headings and in the label for the Primary Key.:It should be entered as a singular rather than plural. The 's' has been added to the layout where necessary. Calculated plural and singular fields would not show up in Find mode. Because this field is wiped when a clone is saved, the script 'SUB.Set Sys.File Name' is called from the Open Script. This resets the filename if it is empty. Therefore a new filename should be entered in All Fields and in this script.

Global Fields must not be used for button names because these fields will be wiped when a clone of the file is saved.

Portals

The file contains an example of a portal. This same arrangement should be used for all Portals. The portal has a circle button at the left which takes the user to the details for that item. If the portal is being used to add lines then the portal should have a Del button at the right.

Copyright © Murray Cumming. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

Murray's Web Pages