14.10.2013 Views

Welcome to FileMaker Pro 10!

Welcome to FileMaker Pro 10!

Welcome to FileMaker Pro 10!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• Optionally keep your records sorted. In Exercise 4, you’ll add a script trigger so that<br />

loading a new layout triggers a grouped report that you created earlier.<br />

What’s Changed<br />

<strong>FileMaker</strong> <strong>Pro</strong> has been able <strong>to</strong> create grouped (sub-summary) reports since several<br />

versions ago. However, you could only view them in Preview mode and, as a result,<br />

could not interact with the data by clicking but<strong>to</strong>ns or changing field values. If you<br />

wanted <strong>to</strong> change a record, you had <strong>to</strong> find it, change it, and then return <strong>to</strong> Preview<br />

mode <strong>to</strong> see how the report looked.<br />

Now you can make changes on the fly and see them take effect immediately.<br />

Where <strong>to</strong> Find This Feature<br />

When you are looking at a grouped report in List View or Table View, you’ll notice the<br />

feature when you edit fields.<br />

Script Triggers<br />

Summary<br />

Now you can specify that a <strong>FileMaker</strong> Script (akin <strong>to</strong> a spreadsheet macro) should run<br />

whenever users take a specified action in Browse Mode or Find Mode, such as clicking in a<br />

field or exiting a viewing mode. <strong>FileMaker</strong> <strong>Pro</strong> comes with five object-based Script Triggers<br />

and seven layout-based Script Triggers.<br />

Object-based Script Triggers Layout-based Script Triggers<br />

Click in a field<br />

Click out of a field<br />

Modify a field value<br />

Save a field value<br />

Press one or more specified keys<br />

Load a record<br />

Commit a record<br />

Revert <strong>to</strong> the previous record<br />

Press one or more specified keys, not in an<br />

object<br />

Load a layout<br />

Enter a new mode<br />

Exit a mode<br />

Script Triggers are especially powerful for grouped reports. In the past, users had <strong>to</strong> go <strong>to</strong><br />

Preview mode, and then click a but<strong>to</strong>n or choose a menu command <strong>to</strong> see the report. Now,<br />

with Format > Set Script Triggers, you can specify that the report will be regenerated<br />

whenever the user changes data in a particular field. They were going <strong>to</strong> do this anyway, so<br />

both the developer and user save time.<br />

What’s Changed<br />

With previous versions, developers had <strong>to</strong> do a lot of work <strong>to</strong> set up triggers, such as<br />

adding but<strong>to</strong>ns and text <strong>to</strong> make them noticeable. There was always a chance the<br />

user wouldn’t take the hoped-for action. Now you can trigger scripts from actions that<br />

users would take anyway, such as clicking in fields or changing viewing modes.<br />

Let’s say you develop a database with a Find function. You can add a Script Trigger<br />

<strong>to</strong> perform the find whenever the user enters the information (OnObjectSave). There’s<br />

no need <strong>to</strong> add a Find but<strong>to</strong>n or Find command.<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!