
Despite the wide range of functions, the internal structure of gFM-Business is simple and structured. In this article we summarize all relevant definitions and standards on which the gFM-Business software is based. In addition to field definitions, relationship names, custom functions and value list names, this also includes the structure of the database-based navigation and all scripts.
Structure of databases and files
The CRM, invoicing and merchandise management system gFM-Business is based on several databases that are available in FileMaker 13 format. The databases are organized thematically, the startDatabase is "gFM-Business.fmp12" (or "gFM-Business.gfm). gFM-Business consists of the following FileMaker 13 databases:
- gFM_Business.fmp12 - Main database that is opened when gFM-Business is started. This database contains 99% of the program logic (layouts, value lists, scripts) for the entire application. This file does not contain any data tables relevant for working with gFM-Business.
- gFM_Print_layouts.fmp12 - This database contains all print layouts of the entire solution. Print layouts can be fully edited and new print layouts can be added and assigned to a module within gFM-Business. This file contains program logic relevant for printing and creating PDF files and for archiving documents, as well as a data table for saving print jobs, which generally does not require any changes.
- gFMw_Article.fmp12 - Database for all data from the Article management. Apart from the user administration, this database does not contain any program logic apart from a few custom functions, but only data tables:
- Article attributes (1 data record = 1 article attribute per article)
- Article stock (1 data record = item stock of an item at location x)
- Article images (1 data set = 1 image per article)
- Article master (master table for articles)
- Suppliers (1 data record = 1 supplier with prices per article)
- Master data_article categories (predefined article categories)
- Master data_article options (predefined article options)
- Master data_article option values (predefined article option values)
- Price groups (1 data record = 1 price group with price x and quantity x per item)
- Tables for Gambio GX2 Interface (optional)
- gFMw_Invoicing.fmp12 - Database for all data from the invoicing module. With the exception of user management and some export scripts, this database contains no program logic and the following data tables:
- Offers and Offer items
- Orders and Order items
- Services (1 data record = 1 service per assigned customer)
- Credit notes and Credit memo items
- Performance logs (1 data record = 1 service log with path to PDF file)
- Delivery bills and Delivery note items
- Reminders and Dunning items
- Invoices and Invoice items
- Cash book (1 data record = 1 partial posting, split postings = x data records)
- Bank entries (Bank statements)
- Direct debits (direct debits and SEPA transfers)
- SEPA_mandates (SEPA mandate management)
- Import_MT940 (export table)
- DATEV_OBE_Export (export table)
- Orders and Order items (purchasing management)
- Trips, Driver's logbooks and Journeys_Changes
- Tables for Gambio GX2 interface (optional)
- gFMw_Contacts.fmp12 - Database for all data from the CRM module. Apart from the user administration, this database does not contain any program logic, only data tables:
- Addresses (1 data record = 1 address per contact)
- Actions (Action Chronicle)
- Contact persons (1 data record = 1 contact person per contact)
- Customers (Contact master table)
- Master data_address types (Default address types in master data)
- Addressbook_OSX (import table)
- Tables for Gambio GX2 interface (optional)
- gFMw_Correspondence.fmp12 - Database for all data from the correspondence module and document management. Apart from the user administration, this database does not contain any program logic, only data tables:
- File attachments (File attachments to documents)
- Correspondence (master table for outgoing correspondence)
- Templates (document templates)
- Archive_Tribe (master table for document archive)
- Archive_Content (Content table for document archive. 1 data record = 1 page)
- gFMw_Master_data.fmp12 - Database for all master data and settings from gFM-Business. Apart from the user administration, this database does not contain any program logic, only data tables:
- Bank codes (Bank sort code directory)
- Bank details (own bank details)
- Posting accounts (own posting accounts)
- Posting chart of accounts (IKR chart of accounts)
- Dialogs (Default settings for dialog boxes)
- Branches (own branches and locations)
- Manufacturer (1 data record = 1 manufacturer)
- Zip codes (Postal code directory for D/A/CH)
- Price groups (1 data record = 1 price group specification)
- Master data (Company master data and settings)
- First names (List of first names for automatic salutations)
- Payment methods (1 data record = 1 payment type specification)
- Tables for Gambio GX2 interface (optional)
- gFMw_Statistics.fmp12 - This file contains only the "Statistics" data table and the program logic for creating data records in this database. A data record in the data table contains a statistics data record that has a specific validity period. A data record can belong to either annual, monthly or weekly statistics. If the data record belongs to an annual statistic, the validity period (and the resulting calculated values) is one year, for a monthly statistic one month and for a weekly statistic one week. gFM-Business in its current version performs all statistical calculations as formulas in real time. The field names for statistical evaluations have meaningful names such as "Promotions_number" or "Offers_net". Previous year values are marked with the prefix "vj_", the year of the previous year has the prefix "vvj_". As of gFM-Business 2.0, all calculations from the formula fields are outsourced to scripts for performance reasons.
- gFMw_System.fmp12 - Database that stores all system-relevant defaults and settings. With the exception of a few GUI-relevant scripts and the user administration, this file does not contain any program logic of its own and the following data tables:
- Event log (system-wide event log)
- gui (Default for system-wide navigation when entering new users)
- Skins (Designs for user interfaces, includes Mac OS X, Windows and iPad)
- Settings (Table for all system settings)
- User (user administration, 1 data record = 1 user)
- Main menu (Default for the main menu when entering new users)
- User_GUI (user-defined system-wide navigation)
- User_Main_menu (user-defined main menu)
- Statistical records (Specifications for statistical records)
- GUI_Buttons (relational table for dynamic navigation)
- Value dates (Foreign currency rates, 1 data record = all rates)
- GUI_Instances (Database of open instances for navigation)
- Twain (Specifications for Twain-compatible scanners)
- Printer (Specifications for installed printers)
Database-based navigation
Both the system-wide navigation and the main menu are database-based in gFM-Business and can be customized individually for each user. In the tables 'gui' and 'main menu' contains the master data for the navigation and the main menu, which are adopted when a new user is created. The navigation and main menu can then be customized for each user - the relevant data is stored in the tables 'user_gui' and 'user_main_menu' saved.
In practice, this means that you do not have to worry about navigation and the main menu during development. If you want to implement a new screen layout for new functions, simply duplicate an existing layout and replace all data components. The navigation does not need to be changed as it is identical on every layout. Then assign the new layout to a module, whereupon the new layout is immediately available in gFM-Business.
gFM-Business document directory
In addition to the database files, the CRM, invoicing and merchandise management system gFM-Business has a further directory "gFM-Business" in which all documents generated at runtime are saved. This folder also contains the "System" and "Temp" directories, in which system files for gFM-Business are located or in which temporary files are saved.
The document directory "gFM-Business" in which all other folders are located is the root directory (system directory) of gFM-Business, the existence of which is checked each time gFM-Business is started. If the directory could not be found, a corresponding message appears on the screen.
Field definitions and relationship graph

Relationships are usually named as "breadcrumb" in a context-relevant way. For example, all addresses of a called customer can be accessed under "Customer_addresses".
Definitions of field names
In gFM-Business, certain standards apply system-wide for the naming of field names in order to ensure uniform development of the components. Field names in gFM Business never contain a space or special characters, but always underscores as separators.
- Primary key - Identification with the prefix _pk (e.g. _pk_Kunden_ID)
- Secondary key - Identification with the prefix _fk (e.g. _fk_Adress_ID)
- Global keys - _sGlobal, always contains the value "1" in all tables.
- Further keys - Key fields are always marked with an underscore "_" as a prefix to ensure that they are displayed as prominently as possible in the relationship graph.
- Data fields - Data fields usually have meaningful names.
- Data record reference fields - Fields "DS_Amendment_Date", "DS_Amendment_Time", "DS_Amendment_SB" and the associated creation fields are usually located in each data table and show the creation and change status of a data record.
- Status fields - Status fields such as "sta_delivery_block", "sta_reminder" or "sta_booked" are identified with the prefix "sta_" or "Status_".
- Calculated statistics fields - Calculated statistics fields within a data table are marked with the prefix "xAnz_" for number calculations or "xSum_" for totals calculations.
- Calculated formula fields - Calculated formula fields are identified with the prefix "xCal_".
- Layout calculations - Calculations for display on layouts are identified with the prefix "xLay_".
Definitions of layout names
All screen layouts of gFM-Business can be found in the main database gFM-Business.fmp12all print layouts can be found in the database gFM_Print_layouts.fmp12. In all other files there are no layouts relevant for the execution of gFM-Business. All layout names are subject to certain standards in gFM-Business.
- scr. - Screen layouts - Screen layouts for desktop screens are marked with the prefix "scr." prefix. Screen layouts are usually named "breadcrumb" for context. The first part after the prefix "scr." identifies the module, e.g. "Customers". The next part identifies the submenu, for example "scr.customers_addresses".
- iPad. - iPad layouts - iPad layouts are identified with the prefix "iPad." iPad layouts are usually named "breadcrumb" for context. The first part after the prefix "scr." identifies the module, e.g. "Customers". The next part identifies the submenu, for example "iPad.customers_addresses".
- sys. - System layouts - Each table from all databases is available in the "gFM_Business" file as a system layout. This procedure makes it possible to implement the entire program logic directly in the main database "gFM_Business.fmp12". It is not necessary to outsource scripts to other files. During execution in scripts, the corresponding system layout is generally used when accessing a table.
- dlg - dialog window - gFM-Business contains several dialog boxes, for example for importing data records from online stores or for selecting items in line items. All dialog boxes in gFM-Business are marked with the prefix "dlg." prefix.
Definitions of value lists
- Module value lists - Value lists that refer to fields in certain modules are identified as a prefix with the first three letters of the respective module and a dot. The Value list "Manufacturer" in the "Article management" module therefore has the name "art.manufacturer", the "Bank details" value list from the invoicing context is called "fak.bank details".
- Function value lists (pop-up menus) - Value lists that contain functions from a pop-up menu (e.g. main function menus in all screens) are identified with the prefix "pop." and the first three letters of the respective module. For example, the value list for the function menu of the "Cashbook" screen in the "Invoicing" module is simply called "pop.fak_cashbook".
- Value lists for sort sequences - A specific sort sequence can be specified in all modules in the print popover. The value lists that are required for this function are marked with the prefix "sort." prefix. The value list for the sort sequence of invoices is therefore called "sort.invoices", for example.
- System value lists - Value lists that are available and valid system-wide are marked with the prefix "sys." prefix. For example, the value list "sys.sort order" contains the values "ascending" and "descending" and is therefore valid across all systems as it can be used everywhere.
- Magic Valuelist - Some value lists in gFM-Business are generated and displayed directly during runtime. These value lists are not defined as a normal FileMaker value list, but were integrated using the "Magic Valuelist" function. This method was presented in detail by Arnold Kegebein in FileMaker Magazine.
Script name definitions
The structure of scripts and script names in gFM-Business is relatively simple and transparent. gFM-Business basically only distinguishes between layout scripts, sub-scripts and system scripts. Layout scripts are either system-wide or refer to a specific screen layout.
Cross-system layout scripts
- lay.main navigation - Jump script that jumps to the current layout across all systems. This Script is an integral part of gFM-Business and it is not recommended to make any changes here.
- lay.toolbar - Cross-system script for all functions from the toolbar. The current context (the current layout) is queried for the "New" function in order to be able to create the correct new data records.
- lay.main menu - Script for calling all functions from the main menu.
- lay. print dialog - Script that contains all functions of all popover dialogs for printing data records.
- lay.calendar - Script that contains all the functions of the group calendar from gFM-Business Professional.
Mask-related layout scripts
There is exactly one layout script for each screen mask that has been marked in gFM Business either with the prefix "scr." or as an iPad layout with the prefix "iPad.". A layout script usually has the same name as the layout, but with the prefix "lay.". For example, all functions of the screen layout "scr.customer_addresses" can be found in the layout script "lay.customer_addresses". All functions that are made available on the screen layout are located within the layout script. All functions are called within the script using script parameters. Many functions are either called as separate sub-scripts or are already completely contained in the layout script.
Partial scripts
Partial scripts are scripts that are called by other scripts during runtime. In many cases, the scripts are executed parameterized (i.e. a parameter is supplied), which in turn returns a corresponding value. Partial scripts can either be called system-wide (prefix "ts.scriptname") or are linked to a specific module (prefix "ts.xyz_scriptname", where xyz is the first three letters of the assigned module).
An important and frequently used subscript is the subscript "ts.process_popup_menu". In this script, all main function menus are processed system-wide and assigned to the corresponding layout scripts. This script works not only for main menus, but also in context-sensitive menus and portals, as the number of the selected data record from portals is also supplied.
SQL scripts
If gFM-Business including the online store interface has been purchased, the software contains a range of SQL-scripts that are required for the interface between gFM Business and the online store. SQL scripts usually consist of an import, export and update script for a specific data table.
System scripts
gFM-Business contains some system scripts that are available system-wide and have not been assigned to a specific module. Examples of some important system scripts at a glance:
- sys.start - Start script, this script is called automatically each time gFM-Business is started.
- sys.LayoutRefresh - Script for updating the layout when using search fields in portals (Spotlight-like search in list views and portals).
- sys.Twain_Init - Script for initializing Twain-compatible scanners
Documentation within scripts
All scripts have been documented internally as far as possible in order to simplify subsequent changes as far as possible. Larger scripts, such as layout scripts, have generally been divided into different areas, such as "Main functions", "Context-sensitive functions", "Script trigger" and "Search mode". All functions relating to these areas can then be found in the respective script area.
Popover dialogs

All entries in popover dialogs are made via temporary global fields from the "Settings (prf)" table with the name <> to <>. For each popover dialog there is exactly one corresponding script in gFM-Business, in which all functions of the popover are called via script parameters. A popover script usually consists of the following sub-scripts:
- trigger.new - This subscript is executed as a start trigger when the popover dialog is opened. In this subscript, the fields placed on the popover dialog can be provided with certain default values.
- sf.new - This button script is executed when the user has clicked the confirmation button. In this script, the temporary global input fields are read and a new data record is entered in the database.
- Open popover - This subscript is the only subscript that does not have a script parameter and is executed if the script is called without parameters.
- trigger.xyz (optional) - Of course, any other script triggers can be added in the script, for example to adjust field contents based on certain criteria during the runtime of the dialog. As popover windows are basically normal FileMaker layouts, the possibilities within popover dialogs are very extensive.
Custom Functions (own functions)
The file "gFM_Business.fmp12" contains a whole series of custom functions that are used during the runtime of gFM-Business. The open license of gFM-Business can of course be extended by any number of additional Custom Functions. Custom Functions can only be edited and extended with FileMaker Pro Advanced. gFM-Business already contains the following integrated Custom Functions:
- cfDialog_Functions - obsolete, these functions are no longer used.
- cfEAN13 - Custom Function for preparing an EAN13 barcode for correct display.
- cfSumEuro - Function for calculating euro amounts with suffixes.
- CSStoFMText - Function to convert CSS-formatted text into FileMaker-formatted text.
- DateTimeMySQLToFMDate - Function to convert the content of a DateTime field in a MySQL database into a FileMaker date field.
- ElapsedTime - Function for calculating time periods between two timestamps.
- EUR_foreign currency - Converts a euro value into any supported foreign currency.
- FM2FMSQLDate - Converts a FileMaker date into the format of a MySQL server.
- FM2UnixTimeStamp - Converts a FileMaker timestamp field into a Unix timestamp field.
- FormatNumber - Universal function for formatting number fields.
- GetAddress - Returns the postal address of any GPS location.
- GetMap - Creates the source code for a Google Maps map from a supplied address.
- HexToRGB - Converts a hexadecimal color code into an RGB color code.
- HTMLtoText - Converts HTML source code into FileMaker-formatted text.
- IsValidEmail - Checks a supplied e-mail address for validity.
- MagicValueList - Custom function for creating Magic Valuelists.
- ParseAllBetween - Text function that provides a text excerpt between two supplied text passages.
- PathFMToPlugin - Converts a FileMaker path (Windows or Mac OS X) into a native Unix path.
- PathPluginToFM - Converts a native Unix path to a FileMaker path (Windows or Mac OS X).
- Platform - Returns a value indicating the system platform on which the software was started.
- RandomInteger - Returns a random integer value in a specific numerical range.
- Remove_Duplicates - This function is used to identify duplicate data records
- StringColumns - This function can be used to pass and split several parameters in a string.
- TextToHTMLEntities - Converts normal text with umlauts into text with HTML entities.
- vcard - Creates a valid vCard from supplied address data for exporting a VCF file.
FileMaker plugins used

Please note that when purchasing an open license, a valid license for the MBS FileMaker Plugin must also be purchased for the number of workstations used. Plugins are only used on desktop computers under Windows or Mac OS X - FileMaker plugins cannot be run under iOS.
gFM-Business Open License Basis
This open license contains all the functions of gFM-Business free as a basis: Contact and address management, correspondence management with template system, article management and an invoicing function for entering quotations, orders, invoices, delivery bills and credit notes. Modules and functions from gFM-Business Professional can be added for a fee. We would be happy to make you an individual offer.
Open license basis in the goFileMaker online store
gFM-Business Open License Professional
This open license contains all the functions of gFM-Business Professional as a basis and therefore has the full range of functions. The open Professional license can also be purchased in conjunction with an open license for the online store interface for Gambio-based online stores. Of course, the interface can then also be individually adapted and expanded to meet your own requirements.
Open license Professional in the goFileMaker online store
Open license for FileMaker developers
If you as a FileMaker developer do not have a basic system for a CRM and ERP system, you can purchase an open license of gFM-Business for your customer and adapt and expand it individually for your customer. Thanks to the system-wide dynamic navigation and iPad integration, new functions can be implemented particularly easily and quickly on the gFM Business platform.

Markus Schall has been developing individual databases, interfaces and business applications based on Claris FileMaker since 1994. He is a Claris partner, FMM Award winner 2011 and developer of the ERP software gFM-Business. He is also a book author and founder of the M. Schall Publishers.





