FileMaker Pro 12 ® Advanced Development Guide
© 2007–2012 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 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 components Choos
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 Index 31 32 33 38 38 39
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.
Chapter 1 | Introducing FileMaker Pro Advanced 6 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
Chapter 1 | Introducing FileMaker Pro Advanced 7 Your responsibilities as a developer FileMaker, Inc. has established procedures for repairing files. If a customer complies with these procedures, then FileMaker may supply a repaired file to the customer. Note FileMaker does not recover account names and passwords. 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.
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 databa
Chapter 2 | Creating database solutions 9 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 10 Runtime applications do not have all the functionality and features of FileMaker Pro. For a complete list of the differences between the runtime application and FileMaker Pro, see Appendix A, “Feature comparison of the runtime application with FileMaker Pro.” You may need to bind your database files several times before you prepare them for delivery to your users.
Chapter 2 | Creating database solutions 11 Binding the solution To bind database files into a runtime database solution: 1. Follow the procedures in “Using the Developer Utilities” on page 8. 2. In the Specify Solution Options dialog box, select Create Runtime solution application(s). 3. To name your runtime application: 1 For Runtime Name, type a name. The name is used for the runtime application filename and for the name of the folder that contains the runtime database solution files.
Chapter 2 | Creating database solutions 12 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. Double-clicking the icons for the solution or auxiliary files might result in errors, depending on whether there are other copies of the runtime application on their hard disk.
Chapter 2 | Creating database solutions 13 Windows solution folder Mac OS X solution folder Runtime application Runtime application package Bound primary and auxiliary solution files Bound primary and auxiliary solution files DLLs generated during binding Extensions 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 14 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.
Chapter 2 | Creating database solutions 15 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 16 To distribute an updated primary file: 1. Open the original primary file from your copy of the runtime solution in FileMaker Pro Advanced. 2. Make the changes to the primary file. 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.
Chapter 2 | Creating database solutions 17 To create a limited-access Kiosk account: 1. With the database solution open, choose File menu > Manage > Security. 2. In the Manage Security dialog box, click New. 3. In the Edit Account dialog box, type an account name. 4. For Account Status, click Active, and for Privilege Set, select New Privilege Set. 5. In the Edit Privilege Set dialog box, give the privilege set a name and description. 6.
Chapter 3 Customizing database solutions You can use FileMaker Pro Advanced to customize your solutions beyond what is possible with FileMaker Pro.
Chapter 3 | Customizing database solutions 19 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 20 About custom menus With FileMaker Pro Advanced, you can create custom menus, menu items, and menu sets for your database solutions. You can: 1 1 1 1 create a menu or edit an existing menu duplicate or delete a menu add, duplicate, or delete menu items specify menu item properties, such as display title, shortcut, and action.
Chapter 3 | Customizing database solutions 21 Creating custom menus To create a custom menu: 1. Choose File menu > Manage > Custom Menus > Custom Menus tab. You see the Manage Custom Menus dialog box. 2. If FileMaker Pro Advanced includes menus that do not exist in this file, click Update to add missing menus to the file. 3. Click Create. 4. In the Create Custom Menu dialog box, do one of the following, then click OK: 1 Click Start with an empty menu.
Chapter 3 | Customizing database solutions 22 To create a new menu item: 1. Choose File menu > Manage > Custom Menus > Custom Menus tab. 2. In the Manage Custom Menus dialog box, select the menu to which you want to add the menu item, then click Edit. 3. In the Edit Custom Menu dialog box, specify which menu items are included in the menu: To Do this Add a command Click Create to add a new () menu item to the list. For Menu Item Type, choose Command, then select Based on an existing command.
Chapter 3 | Customizing database solutions 23 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 (Windows) or OK (Mac OS). 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 24 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. For more information, see “Creating custom menus” on page 21. 1 Click – to remove a custom menu in the Select Menu dialog box.
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
Chapter 4 | Debugging and analyzing files 26 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 Modifiable.
Chapter 4 | Debugging and analyzing files 27 Disabling and enabling script triggers You can temporarily disable and enable script triggers while you work in the Script Debugger. You must have Full Access privileges to disable script triggers. Script triggers are enabled by default. 1. Select Tools menu > Script Debugger. 2. To disable all script triggers in a file, click Disable Script Triggers. 3. To enable all script triggers, click Enable Script Triggers.
Chapter 4 | Debugging and analyzing files 28 3. Perform the following tasks in the Current tab: To Do this Edit or copy local or global variables Double-click a variable in the list. Sort fields and variable in the list Click a column heading. Items in the list are grouped by type, then sorted in this order: fields, global variables, local variables. Add an expression to the Watch list Click Add to Watch. FileMaker Pro switches to the Watch tab where the expression appears.
Chapter 4 | Debugging and analyzing files 29 2. Perform the following tasks: 1 To add an expression, click . In the Edit Expression dialog box, build an expression, then click Monitor to add the expression to the Data Viewer.
Chapter 4 | Debugging and analyzing files 30 To create a Database Design Report: 1. Open all database files for which you want to produce a Database Design Report. You must have full access privileges for any file for which you want to produce a Database Design Report and the file must be open in FileMaker Pro Advanced. You can run a Database Design Report on local or remote files. 2. Choose Tools menu > Database Design Report. 3.
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.
Appendix A | Feature comparison of the runtime application with FileMaker Pro 32 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 not included in the Preferences dialog box for the runtime application.
Appendix A | Feature comparison of the runtime application with FileMaker Pro 33 Menu command comparison The following tables show the menu commands that are available in FileMaker Pro (Pro) and in the runtime application (RT).
Appendix A | Feature comparison of the runtime application with FileMaker Pro Edit Menu command Windows Pro 34 Windows RT Mac OS X Pro Mac OS X RT Paste 1 1 1 1 Paste Text Only 1 1 1 1 Clear 1 1 1 1 Duplicate 1 Select All (Select All Records) 1 1 1 1 Find/Replace 1 1 1 1 1 1 1 1 1 Spelling 1 1 Object 1 1 Export Field Contents 1 1 Preferences 1 1 1.
Appendix A | Feature comparison of the runtime application with FileMaker Pro Insert Menu command Windows Pro 35 Windows RT Mac OS X Pro Mac OS X RT 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 Format Menu command Windows Pro Windows RT Mac OS X Pro Mac OS X RT Font 1 1 1 1 Size 1 1 1 1 Style 1 1 1 1 Align Text 1 1 1 1 Line Spacing 1 1 1 1 Text Color 1 1 1 1 Records M
Appendix A | Feature comparison of the runtime application with FileMaker Pro Requests Menu command (Find mode) Windows Pro 36 Windows RT Mac OS X Pro Mac OS X 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 1 1 Constrain Found Set 1 1 1 1 Extend Found Set 1 1 1 1 Revert Request 1 1 1 1 Scripts Menu command Windows Pro Windows RT Mac OS X Pro Manage Scripts 1
Appendix A | Feature comparison of the runtime application with FileMaker Pro Help Menu command Windows Pro 37 Windows RT Mac OS X Pro FileMaker Pro Help 1 1 Keyboard Shortcuts 1 1 Quick Start Screen 1 1 Resource Center 1 1 Product Documentation 1 1 Consultants and Solutions 1 1 Provide FileMaker Feedback 1 1 Check for Updates 1 1 Register FileMaker Pro 1 1 FileMaker Forum 1 1 Service and Support 1 1 About FileMaker Pro (or About FileMaker Pro Advanced) 1 Mac OS X RT
Appendix A | Feature comparison of the runtime application with FileMaker Pro 38 Ignored script steps Because some features have been removed from the runtime application, the following script steps are ignored by the runtime application: 1 1 1 1 1 1 1 1 1 Open Manage Database 1 1 1 1 1 1 New File Open Manage Value List Open Manage Data Sources Open Manage Scripts Open Manage Layouts Open Manage Containers Open Sharing Open Help Set Multi-User Open File Options (partially available; Spell checking ta
Index A About layout described 6 required contents of 7 access privileges 7, 18 accounts and privileges 7, 18 removing Admin access 9 Admin access removing from files 9 removing from Kiosk solutions 17 Apple events in runtime applications 31 authenticating scripts 26 auxiliary files problems with double-clicking icons 12 updating 16 B backups 15 binding key about 11 updating runtime database solutions 15 binding runtime solutions 11 C commands, menu available in runtime applications 33 compression utiliti
functions custom 19 monitoring in formulas 29 H Help menu commands available in runtime applications 37 Help layout 14 HTML format for Database Design Reports 29 I icons for runtime solutions 12 Insert menu commands available in runtime applications 34 installation instructions 6 installers for runtime databases 13 InstallShield 13 Internet databases on 6 runtime applications on 31 J JDBC, FileMaker as data source 6 K keyboard shortcuts in custom menu items 23 Kiosk solutions, creating 16 L Layout
S V Save Records as PDF script step 38 Save Records as Snapshot Link script step 38 schemas, database copying or importing 18 documenting 29 Script Debugger described 25 with script triggers 26 script triggers, debugging 26 scripts authenticating 26 debugging 25 disabling script steps 26 disabling script triggers 27 steps ignored by runtime applications 38 unlocking 26 Scripts menu commands available in runtime applications 36 separators, menu item 22 Set Multi-User script step 38 settings file 9 shor