Posts Tagged ‘filemaker’

Presentation: Dynamic Repeating Calculation Reports

Friday, October 15th, 2010

Goal: Reduce table field definition clutter caused by single-purpose calculation fields while still creating complex reports, using FileMaker Pro.

FileMaker Pro has significant capabilities for reporting, but it can sometimes be frustrating creating calculation fields for everything you might want to see only for a single report. Wouldn’t it be nice to create “temporary” fields programmatically via a script that last only while running the report?

There is a way to do this, using the Evaluate function: Create a single calculation field with, say, 100 repetitions, and have it Evaluate calculation text in matching repetitions of a repeating Global Text field. It can be tricky to do this successfully and decrease the likelihood of breaking your report if fields are renamed. I delivered a presentation for the New York FileMaker Developers’ Group on creating a detailed report (simplified for the demo) with many columns, percentages of many values out of the total for multiple sub-summaries, all with only a pair of fields. Download the Dynamic Repeating Calculation Reports demo file to see more. One final note: the most important thing to remember to accomplish this successfully is to wrap every non-repeating field used in your calculations with the Extend() function, so the repeating calculation gets a value beyond its own first repetition.

Presentation: Web Form Posting with POST Method

Saturday, July 10th, 2010

I recently gave a presentation for a joint meeting of the New York FileMaker Developers Group and the CocoaHeads NYC Group. It was a demonstration on how to submit web forms using the POST method from within FileMaker Pro using the open source command line tool cURL (comes pre-installed in Mac OS X).

FileMaker has the ability to load web pages into a “web-viewer” and can thus be used to programmatically load search results using web forms that submit via the GET method, where the search terms are embedded in the URL of the results page. A developer only needs to create a URL that includes the search terms and set the web-viewer to display that URL. However, many useful sites use the POST method, where the search terms and other parameters are sent in a separate HTTP header, rather than directly in the URL request.

The command line tool cURL has many options for accessing data via HTTP, FTP, and much more, including the ability to programmatically submit form data via POST. So, FileMaker can run an AppleScript command that calls cURL by using the AppleScript command “do shell script.”

A completely unlocked copy of the demo file I used in my presentation is now available online: Web Form POST Demo. Please note that it leverages features of Mac OS X, and thus will not work as-is for the Windows version of FileMaker. There are alternative plugins that can be used to perform similar operations for Windows.