« Xojo Stammtisch in Be… | Home | DynaPDF Manual online… »

Automate creation of Database Design Reports in FileMaker


For a recent project I needed to export over 400 FileMaker databases to html reports. But FileMaker is not really scriptable. With FileMaker 16 you need permissions to use AppleScripts per database and that's not practical for this. While FM.RunDataDesignReport is convenient for inside a solution, it's also not applicable for a lot of databases. So I came to use an AppleScript to control FileMaker and click the right buttons for me: 

tell application "System Events" to tell process "FileMaker Pro Advanced"

set frontmost to true

delay 0.5

-- menu

tell menu bar item "Tools" of menu bar 1

click

click menu item "Database Design Report..." of menu 1

end tell

delay 0.5

-- options

click radio button "HTML 1 of 2" of window "Database Design Report"

if (value of checkbox "Automatically open report when done" of window 1) = 1 then

click checkbox "Automatically open report when done" of window 1

end if

delay 0.5

-- create

click button "Create" of window 1

delay 0.5

-- save

click button "Save" of window 1

delay 0.5

-- close

set frontmost to true

keystroke "w" using command down

end tell

This script can be called when you have a FileMaker database open. It will trigger menu command to open the Database Design Report dialog and click some options save the html report. Works fine here and I successfully created all those reports.

25 05 17 - 10:49
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.