FileMaker Pro 11 Advanced ® Development Guide
© 2007–2010 FileMaker, Inc. All Rights Reserved. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries. The file folder logo is a trademark of FileMaker, Inc. All other trademarks are the property of their respective owners. FileMaker documentation is copyrighted. You are not authorized to make additional copies or distribute this documentation without written permission from FileMaker.
Contents Chapter 1 Introducing FileMaker Pro Advanced About this guide Using the FileMaker Pro Advanced documentation Where to find PDF documentation Abiding by the license agreement for runtime solutions Your responsibilities as a developer 5 5 6 6 7 Chapter 2 Creating database solutions Using the Developer Utilities About creating runtime solutions Converting and upgrading previous solutions Binding the solution Starting runtime database solutions Distributing runtime solutions Organizing solution compo
FileMaker Pro Advanced Development Guide Chapter 5 Developing third-party FileMaker plug-ins Making plug-ins accessible to users Installing plug-ins Enabling plug-ins Configuring plug-ins 35 36 36 37 Appendix A Feature comparison of the runtime application with FileMaker Pro Application and document preferences Menu command comparison Ignored script steps Stored registry settings or preferences 40 41 46 47 Index 49
Chapter 1 Introducing FileMaker Pro Advanced Welcome to FileMaker® Pro Advanced. This product includes advanced development and customization tools designed especially for database developers. You can use either FileMaker Pro or FileMaker Pro Advanced to create and test your database solutions.
FileMaker Pro Advanced Development Guide The following manuals are included: 1 FileMaker Pro Advanced Development Guide (this manual): describes how to use the features available in FileMaker Pro Advanced 1 Installation and New Features Guide for FileMaker Pro and FileMaker Pro Advanced: contains installation instructions and a list of the new features in the current version 1 FileMaker Pro User’s Guide: contains key concepts and basic procedures 1 FileMaker Pro Tutorial: contains step-by-step lesson
Chapter 1 | Introducing FileMaker Pro Advanced 7 Your responsibilities as a developer FileMaker has established procedures for repairing files. If a customer complies with these procedures, then FileMaker may supply a repaired file to the customer. If you distribute database files with passwords or you have removed full access privileges and do not want FileMaker to repair a file for a customer who requests this service, you must: 1.
FileMaker Pro Advanced Development Guide
Chapter 2 Creating database solutions FileMaker Pro Advanced provides Developer Utilities that let you: 1 rename a set of database files and automatically update the internal links to related files and scripts 1 bind your database files into a stand-alone runtime database solution that does not require FileMaker Pro or FileMaker Pro Advanced in order to be used on a computer 1 remove administrative access from all accounts and prevent users from modifying most design or structural elements of your databas
FileMaker Pro Advanced Development Guide 10. Do one of the following: 1 If you want to create a copy of your database files with new names, click Create. Note FileMaker Pro Advanced automatically updates internal links to related files and scripts. 1 If you want to further customize your database files or bind the files, under Solution Options, click Specify. 11.
Chapter 2 | Creating database solutions 11 About creating runtime solutions Use the Developer Utilities to produce a stand-alone runtime database solution that users can access without running FileMaker Pro or FileMaker Pro Advanced. The Developer Utilities create a copy of your files, and bind the database file or files to a runtime application with a name that you specify. Runtime applications do not have all the functionality and features of FileMaker Pro.
FileMaker Pro Advanced Development Guide Once you have converted the files, you can upgrade them to take advantage of newer FileMaker Pro and FileMaker Pro Advanced features. If necessary, create scripts to import users’ existing data from the old runtime database solution into the new, upgraded solution. See Help for more information on importing data into upgraded runtime solutions. Use the Developer Utilities to bind the solution files into a new, upgraded runtime database solution.
Chapter 2 | Creating database solutions 13 9. Click Create. The Developer Utilities copy all of the runtime files to a new folder created inside the Project Folder and named after the runtime solution. Starting runtime database solutions Double-click to start Runtime application icon Solution file icon Important Your users should start your solution by double-clicking the runtime application icon, not the solution file icon.
FileMaker Pro Advanced Development Guide Windows solution folder Runtime application Bound primary and auxiliary solution files DLLs generated during binding Extensions Mac OS X solution folder Runtime application package Bound primary and auxiliary solution files Extensions Dictionaries Dictionaries language resource folders Example of Windows and Mac OS X solution contents for distribution Important These files and folders must not be renamed.
Chapter 2 | Creating database solutions 15 Using a compression utility program If your runtime database solution is not complex and you have confidence in the technical experience of your end users, you might consider a compression utility program rather than a custom installation program. Sharing solutions over a network Users cannot share your runtime database solution over a network unless they access the files using FileMaker Pro or FileMaker Pro Advanced installed on their machines.
FileMaker Pro Advanced Development Guide Testing before and after creating your solution You should verify the functionality of your database solution by testing it thoroughly before and after you customize it with the Developer Utilities. To ensure the quality of your custom database solution: 1 Verify every function and option in your solution. If you’re developing a solution for both platforms, test it on both Windows and Mac OS X platforms.
Chapter 2 | Creating database solutions 17 3. If necessary, create an Import script so users can import their existing data into the new primary file. For more information about importing data into upgraded runtime solutions, see Help. 4. Send your users a copy of the new primary file with instructions to replace the old primary file in the runtime database solution folder. To distribute a new or updated auxiliary file: 1.
FileMaker Pro Advanced Development Guide 5. In the Edit Privilege Set dialog box, give the privilege set a name and description. 6. For Layouts, Value Lists, and Scripts, select either All view only or All no access. 7. Clear the Manage extended privileges checkbox. 8. Select other options as required and click OK. To enable Kiosk mode: 1. Follow the procedures in “Using the Developer Utilities” on page 9. 2. In the Specify Solution Options dialog box, select Enable Kiosk mode for non-admin accounts.
Chapter 3 Customizing database solutions You can use FileMaker Pro Advanced to customize your solutions beyond what is possible with FileMaker Pro. You can: 1 1 1 1 1 copy and paste fields for use within the same file or other database files copy or import existing tables into your database file create custom functions for use anywhere within a file create custom menus create custom layout themes Important You must have full access privileges to customize database solutions.
FileMaker Pro Advanced Development Guide Creating custom functions Use the Custom Functions feature to create custom functions that can be reused anywhere in a database file and copied or imported to other FileMaker Pro files. Once formulas are written for the function, they don’t have to be rewritten to be applied to other fields or used in other scripts. You can maintain and edit custom functions and the formulas they contain in one central location.
Chapter 3 | Customizing database solutions 21 Menu set (for this file window) Menu bar Menu display title Submenu Menu Separator Menu item Custom menu terminology You can customize menus by: 1 editing a copy of a standard FileMaker menu. Use this method to make minor changes to existing menus, for example, to modify the properties of a few menu items. 1 starting with an empty menu. Use this method to make significant changes to menus, for example, to add menus and change menu item properties.
FileMaker Pro Advanced Development Guide The custom menu item is used in Custom Menu Set 1 by default. To see the custom menu item in FileMaker Pro: 1. For Default menu set for this file, select Custom Menu Set 1, then click OK to close the Manage Custom Menus dialog box. 2. Choose the Records menu. The New Invoice menu item appears at the top of the Records menu. Creating custom menus To create a custom menu: 1. Choose File menu > Manage > Custom Menus > Custom Menus tab.
Chapter 3 | Customizing database solutions 23 Creating custom menu items After you create a menu, you can create menu items. You can also create or edit menu items that are copies of the Standard FileMaker menus. Menu items can be commands, submenus, or separators. You can create a menu item that is based on a standard FileMaker command or you can create a menu item that initially does not have an assigned command.
FileMaker Pro Advanced Development Guide To change the properties of a menu item: 1. Select a menu item from the Menu Items list and do one or more of the following: To Do this Change a command for a menu item For Based on an existing command, click Specify, choose a different command, then click Select. Change a menu item from one type to another For Menu Item Type, choose a different type. (For example, you can change a separator to a command.
Chapter 3 | Customizing database solutions 25 To create or edit menu sets: 1. Choose File menu > Manage > Custom Menus > Custom Menu Sets tab. 2. Click Create. 3. In the Edit Custom menu set dialog box, click Add to specify which menus to include in the menu set. To: Do this: Add a menu to this menu set Click Add, do one of the following in the Select Menu dialog box, then click Select: 1 Choose a menu from the list. 1 Click + to create a new menu.
FileMaker Pro Advanced Development Guide Fill color and pattern for header part Text in header part Fill color and pattern for body part Field label Field text Field fill, border and shadow effect Text in footer part Fill color and pattern for footer part Create themes to automatically apply different styles to text and background fills in layout parts, fields, and field labels To create or modify a theme: 1. Make a copy of one of the theme files in the Themes folder.
Chapter 3 | Customizing database solutions 27 4. Change the name of a theme by replacing the value of the THEMENAME element with a new name. Important If your THEMENAME value contains any upper-ASCII characters, use the HINT attribute to ensure that the theme name will appear on both the Windows and Mac OS X platforms. 5. Change the values of other elements and attributes.
FileMaker Pro Advanced Development Guide
Chapter 4 Debugging and analyzing files The FileMaker Pro Advanced features explained in this chapter are: 1 the Script Debugger for systematic testing and debugging of FileMaker scripts 1 the Disable script step feature for testing portions of a script 1 the Database Design Report feature for publishing comprehensive documentation on database schema and options 1 the Data Viewer for monitoring fields, variables, and calculations Note See Help for detailed, comprehensive information and step-by-step proce
FileMaker Pro Advanced Development Guide You can view sub-scripts when you step through scripts in the Script Debugger. For example, if Script A calls Script B, which then calls Script C, you can view the steps in all three scripts. The Script Debugger recognizes the privileges attached to each script. A script will only appear in the Script Debugger if you have editing privileges for the script and the access privileges for the script are set to to log in and edit script steps in restrictedModifiable.
Chapter 4 | Debugging and analyzing files 31 2. In the Manage Scripts dialog box, double-click the script name. Or, click the Edit button in the Script Debugger dialog box. 3. In the Edit Script dialog box, select one or more script steps, then click Disable or Enable. For more information about debugging scripts, see Help. Using the Data Viewer You can use the Data Viewer to monitor expressions like field values, local and global variables, and calculations.
FileMaker Pro Advanced Development Guide 6. Click the Watch tab. Drag an arrow up or down to change the order 7. Choose one of the following: To Do this Add an expression Click Edit an expression Select an expression, then click Duplicate an expression Select one or more expressions, then click . Delete an expression Select one or more expressions, then click . . or double-click the expression. 8.
Chapter 4 | Debugging and analyzing files 33 Using the Database Design Report Use the Database Design Report (DDR) feature to document the schema of your database and publish it to an HTML or XML file. You can choose which elements and database tables in the database you want to report. The HTML version of the report is hyperlinked and you can view or print it in a Javascript-enabled web browser.
FileMaker Pro Advanced Development Guide
Chapter 5 Developing third-party FileMaker plug-ins If you are a C or C++ programmer and familiar with calculations in FileMaker Pro and FileMaker Pro Advanced, you can create external function plug-ins that extend the feature set of the applications. The plugins can take advantage of recursion and looping or hook into other programming interfaces.
FileMaker Pro Advanced Development Guide Installing plug-ins Some plug-ins (and the libraries they reference) load only when the process is executed by a user who is logged into the system; FileMaker Server executes as a service, not as a user process. Consequently, you need to write plug-ins differently to work with FileMaker Server. Users will need to see their operating system documentation to find which libraries are typically available.
Chapter 5 | Developing third-party FileMaker plug-ins 37 Configuring plug-ins To configure a plug-in: 1. Select the plug-in in the Preferences dialog box. 2. Click Configure. The Configure button is only available when the sixth character in the option string of the selected plugin is “Y.” 3. Follow instructions in the configuration dialog box to configure the plug-in. 4. Click OK.
FileMaker Pro Advanced Development Guide
Appendix A Feature comparison of the runtime application with FileMaker Pro When you double-click the FileMaker Pro application icon to start the application you can create a new database or choose a file to open. When you start a FileMaker Pro runtime application, the primary bound database file opens automatically. Other key differences between the runtime application and FileMaker Pro include the following: 1 All the database design features have been removed or hidden in the runtime application.
FileMaker Pro Advanced Development Guide Application and document preferences In the runtime application, some options are not available on the General tab of the Preferences dialog box. General preferences in a runtime application (Mac OS X) The Layout tab is changed to the Color tab in the Preferences dialog box for the runtime application. General preferences in a runtime application (Windows) The File Options dialog box in the runtime application displays only the Spelling tab.
Appendix A | Feature comparison of the runtime application with FileMaker Pro 41 Menu command comparison The following tables show the menu commands that are available in FileMaker Pro (Pro) and in the runtime application (RT).
FileMaker Pro Advanced Development Guide Windows Edit Menu command Mac OS X Pro RT Pro RT Undo/Can’t Undo 1 1 1 1 Redo/Can’t Redo 1 1 1 1 Cut 1 1 1 1 Copy 1 1 1 1 Paste 1 1 1 1 Paste Special 1 1 Clear 1 1 1 1 Duplicate 1 Select All 1 1 1 1 Find/Replace 1 1 1 1 Spelling 1 1 1 1 Object 1 1 Export Field Contents 1 1 1 1 Preferences 1 1 1 Windows View Menu command Mac OS X Pro RT Pro RT Browse Mode 1 1 1 1 Find Mode 1 1 1 1
Appendix A | Feature comparison of the runtime application with FileMaker Pro Windows Insert Menu command Mac OS X Pro RT Pro RT Picture 1 1 1 1 QuickTime 1 1 1 1 Sound 1 1 1 1 File 1 1 1 1 Object 1 1 Current Date 1 1 1 1 Current Time 1 1 1 1 Current User Name 1 1 1 1 From Index 1 1 1 1 From Last Visited Record 1 1 1 1 Windows Format Menu command Mac OS X Pro RT Pro RT Font 1 1 1 1 Size 1 1 1 1 Style 1 1 1 1 Align Text 1 1 1 1
FileMaker Pro Advanced Development Guide Windows Records Menu command Mac OS X Pro RT Pro RT Saved Finds 1 1 1 1 Sort Records 1 1 1 1 Unsort 1 1 1 1 Replace Field Contents 1 1 1 1 Relookup Field Contents 1 1 1 1 Revert Record 1 1 1 1 Requests Menu command (Find mode) Windows Mac OS X Pro RT Pro RT Add New Request 1 1 1 1 Duplicate Request 1 1 1 1 Delete Request 1 1 1 1 Go to Request 1 1 1 1 Show All Records 1 1 1 1 Perform Find 1 1
Appendix A | Feature comparison of the runtime application with FileMaker Pro Windows Window Menu command Mac OS X Pro RT Pro RT New Window 1 1 1 1 Show Window 1 1 1 1 Hide Window 1 1 1 1 Minimize Window 1 1 1 1 Tile Horizontally 1 1 1 1 Tile Vertically 1 1 1 1 Cascade Windows 1 1 1 1 Arrange Icons 1 1 1 1 1 1 Bring All To Front 1 1 Windows Help Menu command Pro Mac OS X RT Pro FileMaker Pro Help 1 1 Keyboard Shortcuts 1 1
FileMaker Pro Advanced Development Guide Application Menu command (Mac OS X only) About FileMaker Pro Pro RT 1 About FileMaker Pro Runtime (Displays if no custom About script is specified) 1 About (Displays if custom About script is specified) 1 Preferences 1 1 Services 1 1 Hide FileMaker Pro 1 1 Hide Hide Others 1 1 Show All 1 1 Quit FileMaker Pro 1 Quit 1 Ignored script steps Because some features have been removed fro
Appendix A | Feature comparison of the runtime application with FileMaker Pro Stored registry settings or preferences Windows registry settings FileMaker Pro stores its registry settings at HKEY_CURRENT_USER\Software\FileMaker\FileMaker Pro\.0 FileMaker Pro Advanced stores its registry settings at HKEY_CURRENT_USER\Software\FileMaker\FileMaker Pro\.0A The runtime application stores its registry settings at HKEY_CURRENT_USER\Software\FileMaker\\.
FileMaker Pro Advanced Development Guide
Index A D About layout described 6 required contents of 7 access privileges 7, 19 accounts and privileges 7, 19 for Kiosk mode 17 removing Admin access 10 Admin access removing from files 10 removing from Kiosk solutions 18 Apple events in runtime applications 39 attributes in layout themes 25 authenticating scripts 30 auxiliary files problems with double-clicking icons 13 updating 17 data sources updating 16 updating automatically 10 Data Viewer 31 Database Design Reports 33 database schemas copying or
FileMaker Pro Advanced Development Guide F I fields copying schema 19 monitoring 31 File menu commands available in runtime applications 41 File Options available in runtime application 40 file references. See data sources FileMaker Developer.
| O ODBC, FileMaker as data source 6 OLE automation in runtime applications 39 Open File Options script step 46 Open File script step 46 Open Help script step 46 Open Manage Data Sources script step 46 Open Manage Database script step 46 Open Manage Layouts script step 46 Open Manage Scripts script step 46 Open Manage Value List script step 46 Open Remote script step 46 Open Sharing script step 46 opening files in runtime applications 39 P passwords, required warning in About layout 7 patterns, layout the
FileMaker Pro Advanced Development Guide T tables, database copying or importing schema 19 excluding from Database Design Report 33 multiple per file 11 testing database solutions 16 scripts 29 text editors 25 themes.