Extract and organize FileMaker Pro scripts from Database Design Reports (DDR) into individual, searchable files.
The script files are not re-usable in FileMaker, this is intended just as a reporting too to make them easier to review.
This tool parses FileMaker DDR XML exports and creates:
- Individual
.fmfiles for each script - Organized symlinks by layout usage
- A comprehensive markdown index
- Easy navigation of unused scripts
In FileMaker Pro:
- Open your database file
- Go to Tools → Database Design Report...
- In the DDR dialog:
- Select your database from the list
- Check Available Tables (select all or specific tables)
- Under Include in Report, check at least:
- ☑ Fields
- ☑ Relationships
- ☑ Scripts
- ☑ Layouts
- Choose Format: XML
- Click Create...
- Save the DDR to:
reports/ddr/- The XML files will be created in this folder
cd reports
python3 extract_scripts.pyOr with uv (recommended):
cd reports
uv run extract_scripts.pyOptions:
# Auto-detect XML file (prompts if multiple found)
python3 extract_scripts.py
# or
uv run extract_scripts.py
# Specify XML file by name
python3 extract_scripts.py vs_db_fmp12.xml
# or
uv run extract_scripts.py vs_db_fmp12.xml
# Specify full or relative path
python3 extract_scripts.py ddr/vs_db_fmp12.xml- Individual scripts:
scripts/*.fm - Scripts by layout:
scripts/layouts/{layout_name}/ - Unused scripts:
scripts/unused/ - Index:
scripts_index.md
reports/
├── extract_scripts.py # Main extraction tool
├── scripts_index.md # Searchable script index
├── ddr/ # Place your DDR XML files here
│ └── *.xml
└── scripts/
├── *.fm # Individual script files
├── layouts/ # Scripts organized by layout
│ └── {layout_name}/
│ └── {script}.fm → (symlink to script)
├── unused/ # Scripts not used in layouts
│ └── {script}.fm → (symlink to script)
└── triggers/ # Scripts used as triggers
└── {script}.fm → (symlink to script)
Each .fm file contains:
Script: Back up monthly
================================================================================
ID: 525
Include in Menu: False
[✓] Show Custom Dialog [ Title: "Make monthly back up?"; ... ]
[✓] If [ Get ( LastMessageChoice )=2 ]
[✓] Halt Script
[✓] End If
...
- 1 XML file: Auto-selects and proceeds
- Multiple XML files: Shows interactive menu with file sizes
- No XML files: Displays helpful error message
- Layouts: Scripts linked by which layouts use them
- Unused: Quickly identify scripts not associated with any layout
- Triggers: Scripts triggered automatically (if any)
- Index: Markdown file with all scripts categorized and searchable
- Unix/macOS/Linux: Uses symbolic links (symlinks)
- Windows: Uses hard links (work like shortcuts without admin privileges)
- Both provide multiple paths to the same script file
- Changes to one location reflect in all linked locations
FileMaker DDRs often contain duplicate script names. The tool:
- Identifies duplicates
- Keeps only unique script names
- Documents duplicate counts in the index
- Python 3.8+ (uses only standard library)
- FileMaker Pro (to generate DDR)
- macOS/Linux/Windows (cross-platform)
- uv (optional but recommended) - Install with:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv is a fast Python package installer. When you run uv run extract_scripts.py, it:
- Automatically ensures Python 3.8+ is available
- Runs in an isolated environment
- No need to manually manage dependencies (script uses only standard library)
Solution: Export a DDR from FileMaker (see step 1 above)
Possible causes:
- Incomplete DDR export
- Corrupted XML file
- Wrong file format
Solution: Re-export DDR with all options checked
Solution: Run from the reports/ directory:
cd reports
python3 extract_scripts.pyThis is normal! FileMaker DDRs include script references from multiple contexts. The tool extracts unique script names only.
The script uses relative paths - you can move the entire reports/ folder to a different location or system without changes.
Edit extract_scripts.py and change:
SCRIPT_EXTENSION = ".fm" # Change to any extensionSafe to run multiple times. The script will:
- Overwrite existing
.fmfiles - Recreate symlinks
- Regenerate the index
- Search scripts: Use your editor's search across the
scripts/directory - Find by layout: Check
scripts/layouts/{layout_name}/ - Review unused: Check
scripts/unused/for potentially obsolete scripts - Use the index:
scripts_index.mdprovides a comprehensive overview
- See CLAUDE.md for detailed technical documentation
- Check the generated
scripts_index.mdfor script statistics - Review extraction output for warnings or errors
This tool is part of the Vital Seeds database documentation system.
Last Updated: 2026-02-06 Script Version: 1.0 Compatible: FileMaker Pro 18+