Plug-ins

Some things just can’t be done (or can’t be done well) using calculations and custom functions. When you run into this situation, you may consider looking into plug-ins, which are tiny applications that live inside FileMaker to help it do specific tasks that it can’t do on its own.

Many plug-ins focus on doing certain things: processing credit card transactions; creating charts; performing certain jobs based on a schedule; or interacting with special devices like cameras, barcode readers, and so on. Although plug-ins work through calculation functions, scripts (which the next section covers) generally control them.

The box in the top-left corner shows how RemoveDuplicates is first called. It receives a list of colors as its one parameter. It returns the first item in the list and the result of the second call. This time, though, Red has been removed from the list. The second call returns Green and the results of the third call. This progresses until the fourth call, when the script passes a single item to RemoveDuplicates. This time RemoveDuplicates simply returns the item without calling itself again. When it returns, the third call has all it needs, so it returns as well. This process goes back up the chain until the first call is reached, and the final result is returned. If you join up the results of each call, you see the correct list.

Figure 12-3. The box in the top-left corner shows how RemoveDuplicates is first called. It receives a list of colors as its one parameter. It returns the first item in the list and the result of the second call. This time, though, Red has been removed from the list. The second call returns Green and the results of the third call. This progresses until the fourth call, when the script passes a single item to RemoveDuplicates. This time RemoveDuplicates simply returns the item without calling itself again. When it returns, the third call has all it needs, so it returns as well. This process goes back up the chain until the first call is reached, and the final result is returned. If you join up the results of each call, you see the correct list.

Get FileMaker Pro 9: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.