Compare commits

...
10 Commits
Author SHA1 Message Date
martin b9d837c9be Persistent Data 2026-10-02 09:45:46 +02:00
martin ec0616df67 Show Custom Dialog 2026-10-02 09:45:46 +02:00
martin b420e40614 updated custom dialo 2026-10-02 09:45:46 +02:00
martin 8a41d2e46a updated custom dialog 2026-10-02 09:45:46 +02:00
martin 1164367365 Insert from URL added 2026-10-01 19:37:52 +02:00
martin 5d6f9ebcf5 updated fmscript skills 2026-09-16 16:48:24 +02:00
martin 506d13c5ea rollback to defaul fmscript format 2026-09-16 14:12:18 +02:00
martin 48a12a78e0 Default to DDRparser script format 2026-09-15 16:39:44 +02:00
martin d5688c08ec added ddr script skills 2026-09-15 16:36:17 +02:00
martin 3bd868da7b added new PDF script steps FM26 2026-09-15 09:39:08 +02:00
10 changed files with 414 additions and 49 deletions

No files matched your search

+6 -5
View File
@@ -26,9 +26,9 @@ Use these locations for a workspace that follows the standard project layout. A
- `../DDR/`: local raw FileMaker DDR input. Never copy it into the repository or commit it; move it only as part of an explicitly approved filesystem migration. - `../DDR/`: local raw FileMaker DDR input. Never copy it into the repository or commit it; move it only as part of an explicitly approved filesystem migration.
- `TICKETS/`: one folder per ticket or workstream. Keep its source requests, handoffs, analysis, questions, reports, assets, and ticket-specific scripts together. Use a `scripts/` subfolder when it helps navigation. - `TICKETS/`: one folder per ticket or workstream. Keep its source requests, handoffs, analysis, questions, reports, assets, and ticket-specific scripts together. Use a `scripts/` subfolder when it helps navigation.
- `FMSCRIPTS/`: tracked complete `.fmscript` files that are not clearly ticket-specific or apply across several workstreams; keep one `.fmscript` file per FileMaker script. - `FMSCRIPTS/`: default location for tracked `.fmscript` files. Use it for FileMaker script work unless the user explicitly requests DDRparser text format.
- `NOTES/`: confirmed knowledge and business rules that apply across more than one ticket. - `NOTES/`: confirmed knowledge and business rules that apply across more than one ticket.
- `DDR-Parsed/`: tracked generated FileMaker reference material. Do not edit it manually. - `DDR-Parsed/`: tracked FileMaker reference material generated by DDRparser. Do not manually edit generated definitions outside `Scripts/`. When a project uses the DDRparser copy-and-paste workflow, edit the affected `Scripts/*.txt` file in place for Git review, paste it into FileMaker, regenerate the DDR, and verify the round trip.
- `ddr-parse.sh`: run `zsh ddr-parse.sh` from the project root to parse the latest DDR into `DDR-Parsed/` when an up-to-date reference is needed. - `ddr-parse.sh`: run `zsh ddr-parse.sh` from the project root to parse the latest DDR into `DDR-Parsed/` when an up-to-date reference is needed.
## Select the relevant skill ## Select the relevant skill
@@ -37,7 +37,8 @@ Read only the skill that matches the work; do not load every shared reference by
- Ticket, request, email, or handoff: `skills/ticket-analysis/SKILL.md` - Ticket, request, email, or handoff: `skills/ticket-analysis/SKILL.md`
- Current implementation, schema, script, calculation, layout, relationship, security, reporting, or integration analysis: `skills/ddr-analysis/SKILL.md` - Current implementation, schema, script, calculation, layout, relationship, security, reporting, or integration analysis: `skills/ddr-analysis/SKILL.md`
- Any `.fmscript` generation, edit, review, or syntax question: `skills/filemaker-fmscript/SKILL.md` and the examples it selects - Any FileMaker script discussion, generation, edit, review, syntax question, or copy-and-paste preparation: use `.fmscript` by default and read `skills/filemaker-fmscript/SKILL.md` and the examples it selects.
- When the user explicitly requests DDRparser text format or a DDRparser copy-and-paste workflow, use `skills/filemaker-ddr-script/SKILL.md` instead.
- New or changed FileMaker object, field, variable, parameter, or result names: `skills/filemaker-naming/SKILL.md` - New or changed FileMaker object, field, variable, parameter, or result names: `skills/filemaker-naming/SKILL.md`
- Project-manager reply or short billable work report: `skills/ticket-delivery/SKILL.md` - Project-manager reply or short billable work report: `skills/ticket-delivery/SKILL.md`
@@ -53,7 +54,7 @@ Read only the skill that matches the work; do not load every shared reference by
## Core rules ## Core rules
- Do not invent business rules, schema details, permissions, or implementation status. Separate confirmed behavior, verified current behavior, proposals, and open questions. - Do not invent business rules, schema details, permissions, or implementation status. Separate confirmed behavior, verified current behavior, proposals, and open questions.
- Use parsed DDR as generated reference data. Do not edit it manually; defer to direct FileMaker verification when the two conflict. - Use parsed DDR as generated reference data and defer to direct FileMaker verification when the two conflict. The only standard manual-edit exception is an authorized DDRparser-format script change under `DDR-Parsed/<solution>/Scripts/`; paste it into FileMaker and regenerate the DDR before calling it implemented.
- Keep work practical and minimal. Review affected data, permissions, workflows, layouts, reporting, integrations, and regression risk where relevant. - Keep work practical and minimal. Review affected data, permissions, workflows, layouts, reporting, integrations, and regression risk where relevant.
- Do not make production changes, send client messages, or modify project files unless explicitly asked. - Do not make production changes, send client messages, or modify project files unless explicitly asked.
- Do not expose credentials or other sensitive values found in source material. - Do not expose credentials or other sensitive values found in source material.
@@ -77,4 +78,4 @@ Read only the skill that matches the work; do not load every shared reference by
## Response format ## Response format
- Do not hard-wrap Markdown prose. Use line breaks only where Markdown structure or meaning requires them. - Do not hard-wrap Markdown prose. Use line breaks only where Markdown structure or meaning requires them.
- Present every FileMaker script snippet, including partial sections, in a fenced `text` block and use valid `.fmscript` format. - Present every FileMaker script snippet, including partial sections, in a fenced `text` block and use `.fmscript` format by default. Use DDRparser text format only when the user explicitly requests it.
+1 -1
View File
@@ -25,5 +25,5 @@ Follow the consuming project's `AGENTS.md` for the active parsed DDR location, d
## Rules ## Rules
- Parsed DDR is generated reference data: do not edit it manually. - DDR analysis is read-only: do not edit parsed definitions while performing analysis. Use `filemaker-ddr-script` for an authorized script change in `DDR-Parsed/<solution>/Scripts/`.
- Do not call a proposal implemented unless the current DDR or direct FileMaker verification proves it. - Do not call a proposal implemented unless the current DDR or direct FileMaker verification proves it.
+55
View File
@@ -0,0 +1,55 @@
---
name: filemaker-ddr-script
description: Read, create, edit, or review FileMaker scripts in DDRparser's copy-and-paste-compatible text format. Use for script files in a project's parsed DDR Scripts directory, DDRparser script syntax, or script steps intended to be converted and pasted into FileMaker. Do not use for `.fmscript` or ai2fm output.
---
# FileMaker DDR script
Produce FileMaker script text that matches DDRparser output and the active project's established script style. DDRparser-compatible text can be converted and pasted into FileMaker as script steps.
## Follow project evidence
1. Read the active project's `AGENTS.md`, `PROJECT.md`, ticket material, and any script-specific instructions before changing a script.
2. Locate the active solution under the project's `DDR-Parsed/` directory. Confirm the target script name, group, filename, and relevant FileMaker objects from current project evidence.
3. Read the target script and structurally similar scripts from the same project. Prefer examples from the same feature, script group, caller/callee chain, and supported FileMaker version. Read a project script template when one exists and applies.
4. Match the project's script structure, comments, section order, error handling, parameter/result conventions, calculation layout, indentation, naming, and use of enabled or disabled steps.
5. Inspect callers, called scripts, fields, layouts, table occurrences, custom functions, and other affected definitions when they determine the script's behavior. Use `ddr-analysis` alongside this skill when broader dependency analysis is needed.
Do not copy conventions or business logic from another client project. Example DDRs used while developing this skill are not part of the skill and are not fallback sources during project work.
## Resolve script-step format
Use this evidence order for every unfamiliar step or parameter form:
1. An exact current instance in the active project's `DDR-Parsed/<solution>/Scripts/` directory.
2. A closely related current script from the same project.
3. [`all-script-steps.txt`](all-script-steps.txt) for the general step name and base form.
Search the active project with `rg` before deciding that a step form is unavailable. Copy an exact project's step name, option labels, option order, punctuation, brackets, quotes, and spacing when a matching form exists. The general catalog permits a step name and shows a base form; it does not authorize inventing unshown options or project object names.
If the required form is still unknown, identify the missing step or option and request a known-good example. Do not substitute a similar step, borrow another client's syntax, translate from `.fmscript`, or infer a parameter form from general FileMaker knowledge.
## Read and write the text format
- Treat the `// Script:` header and any `// Group:` line as file metadata. Preserve the existing header; for a new script, derive only the header fields supported by confirmed project naming and group evidence.
- Treat `#` lines as FileMaker Comment steps. Preserve the project's comment wording and section style.
- Treat `// ` before a step as DDRparser's disabled-step representation. Retain disabled steps unless the requested change explicitly enables or removes them.
- Preserve control-block structure and use the project's indentation for nested `If`, `Else If`, `Else`, `Loop`, and corresponding closing steps. Every opened control block must have its matching close.
- Preserve multiline calculations as a single script step, including calculation comments, tabs, line breaks, operators, and the final closing bracket.
- Use the active project's representation for empty options, named objects, curly or straight quotes, semicolon spacing, and option continuation lines.
- Preserve supported plug-in steps only when their exact form is present in the current project or the general catalog.
- Keep changes minimal. Do not rewrite unaffected comments, calculations, formatting, or neighboring steps merely to normalize them.
- Do not invent business rules, FileMaker objects, functions, fields, layouts, scripts, relationships, parameters, results, or error behavior.
For a requested snippet, return DDRparser-format text in a fenced `text` block. For a requested project change, edit the complete tracked `.txt` file at `DDR-Parsed/<solution>/Scripts/<script name>.txt`; do not create a parallel `.fmscript` or source-scripts directory.
## Review and round-trip
1. Compare every changed step and parameter form with the selected current project instance or `all-script-steps.txt` entry.
2. Check matching control blocks, nesting, disabled-step markers, multiline brackets, and confirmed object names.
3. Inspect the scoped Git diff and run `git diff --check`.
4. Review the edited tracked script text before it is pasted into FileMaker.
5. When FileMaker implementation is within the request and available, convert or copy the text through the project's DDRparser clipboard workflow and paste it into FileMaker.
6. After a paste, regenerate `DDR-Parsed/` with the project's documented parser command and compare the resulting script with the reviewed text.
Editing the tracked script file proves only the proposed text. Claim successful FileMaker implementation or round-trip compatibility only after the paste and regenerated DDR have been verified. If those actions are unavailable, report them as pending validation.
@@ -0,0 +1,4 @@
interface:
display_name: "FileMaker DDR script"
short_description: "Author DDRparser-compatible FileMaker scripts"
default_prompt: "Use $filemaker-ddr-script to create or edit a FileMaker script in DDRparser's copy-and-paste-compatible text format."
@@ -0,0 +1,220 @@
#
#Control
Allow User Abort [ Off ]
Configure Local Notification
Configure Region Monitor Script
#Else
#Else If
#End If
#End Loop
#Exit Loop If
Exit Script
Halt Script
If [ 1=0 ]
Else If [ 1=1 ]
Else
End If
Install OnTimer Script
Loop [ Flush: Always ]
Exit Loop If [ 1=1 ]
End Loop
Pause/Resume Script
Perform Script [ “All script steps” ]
Perform Script on Server [ “All script steps and all options”; Wait for completion ]
Set Error Capture [ On ]
Set Layout Object Animation
Set Variable [ $Var; Value: 1+2 ]
#
#Navigation
Close Popover
Enter Browse Mode [ Pause: Off ]
Enter Find Mode [ Pause: On ]
Enter Preview Mode [ Pause: Off ]
Go to Field [ ]
Go to Layout [ original layout ]
Go to Next Field
Go to Object [ Object Name: ]
Go to Portal Row [ Select: On ; First ]
Go to Portal Row [ Select: On ; First ]
Go to Previous Field
Go to Record/Request/Page [ First ]
Go to Related Record [ Show only related records ; From table: “” ; Using layout: “” () ]
#
#Editing
Clear [ Select ]
Copy [ Select ]
Cut
Paste [ Select ]
Perform Find/Replace
Select All
Set Selection [ ]
Undo/Redo
#
#Fields
Export Field Contents
Insert Audio/Video
Insert Calculated Result
Insert Current Date
Insert Current Time
Insert Current User Name
Insert File
Insert PDF
Insert Picture
Insert Text
Insert from Device
Insert from Index
Insert from Last Visited
Relookup Field Contents [ With dialog: On ]
Replace Field Contents [ With dialog: On ]
Set Field [ "foo" ]
Set Field By Name [ Specify target field; ; ]
Set Next Serial Value [ ]
#
Insert Object
Insert QuickTime
#
#Records
Commit Records/Requests [ With dialog: On ]
Copy All Records/Requests
Copy Record/Request
Delete All Records [ With dialog: On ]
Delete Portal Row [ With dialog: On ]
Delete Record/Request [ With dialog: On ]
Duplicate Record/Request
Export Records
Import Records [ With dialog: On ]
New Record/Request
Open Record/Request
Revert Record/Request [ With dialog ]
Save Records as Excel
Save Records as PDF [ 111 ]
Save Records as Snapshot Link
Truncate Table
#
#Found Sets
Constrain Found Set
Extend Found Set
Find Matching Records
Modify Last Find
Omit Multiple Records [ ]
Omit Record
Perform Find
Perform Quick Find
Show All Records
Show Omitted Only
Sort Records [ With dialog: On ]
Sort Records by Field
Unsort Records
#
#Windows
Adjust Window
Arrange All Windows
Close Window [ Current Window ]
Freeze Window
Move/Resize Window [ Current Window ]
New Window [ Style: Document ; Close: Yes ; Minimize: Yes ; Maximize: Yes ; Resize: Yes ; Menu bar: No ; Toolbar: No ]
Refresh Window
Scroll Window [ Home ]
Select Window [ Current Window ]
Set Window Title [ Current Window ; New Title: ]
Set Zoom Level [ 100% ]
Show/Hide Menubar [ Toggle ]
Show/Hide Text Ruler
Show/Hide Toolbars [ Toggle ]
View As
#
Set Allowed Orientations
#
#Files
Close File
Convert File
New File
Open File
Print
Print Setup [ With dialog ]
Recover File
Save a Copy as
Set Multi-User
Set Use System Formats [ On ]
#
#Accounts
Add Account
Change Password
Delete Account
Enable Account
Re-Login
Reset Account Password
#
#Spelling
Check Found Set
Check Record
Check Selection
Correct Word
Edit User Dictionary
Select Dictionaries
Spelling Options
#
#PDF Files
#
Append PDF [ From: File ]
Cancel PDF
Close PDF
Create PDF [ 111 ]
Open PDF
Print PDF
Save Records as PDF [ 111 ]
#
#Open Menu Item
Open Edit Saved Finds
Open File Options
Open Find/Replace
Open Help
Open Hosts
Open Manage Containers
Open Manage Data Sources
Open Manage Database
Open Manage Layouts
Open Manage Themes
Open Manage Value Lists
Open Favorites
Open Settings
Open Script Workspace
Open Sharing
Open Upload to Host
#
#Miscellaneous
#Comment
Allow Formatting Bar [ Off ]
AVPlayer Play
AVPlayer Set Options
AVPlayer Set Playback State
Beep
Dial Phone
Enable Touch Keyboard [ Off ]
Execute SQL
Exit Application
Flush Cache to Disk
Get Folder Path [ ]
Install Menu Set [ “[Standard FileMaker Menus]” ]
Install Plug-In File
Open URL [ With dialog: On; ]
Perform AppleScript [ display dialog "Hello world!" ]
Refresh Object
Refresh Portal
Send DDE Execute
Send Event
Send Mail [ Send via E-mail Client; With dialog: On ]
Set Web Viewer [ Object Name: ; Action: Reset ]
Show Custom Dialog [ Title: ]
Speak
#
Perform JavaScript in Web Viewer [ Object Name: ; Function Name: ]
Set Allowed Orientations
#
##External Plugin Steps
#@var $command,$P1,$P2,$P3,$P4
MBS [ $Command; $P1; $P2; $P3; $P4; $P5; $P6; $P7; $P8; $P9 ]
#
#HIDDEN (Step 184)
Open Starter Solution
#
@@ -36,3 +36,4 @@ Trigger Claris Connect Flow [ Flow: <unknown> ; JSON Data: ]
Exit Script [ Result: ] Exit Script [ Result: ]
Halt Script Halt Script
Configure Persistent Data [ Name ; Instance ID: "instanceID" ; Value: $value ]
@@ -9,7 +9,7 @@ Insert File [ Dialog options: Off ]
Insert from Device [ Type: Camera; Camera: Back; Resolution: Full; Flash: Auto ] Insert from Device [ Type: Camera; Camera: Back; Resolution: Full; Flash: Auto ]
Insert from Index [ Select ] Insert from Index [ Select ]
Insert from Last Visited [ Select ] Insert from Last Visited [ Select ]
Insert from URL [ Select ; With dialog: Off ] Insert from URL [ Select ; With dialog: Off ; Target: $response ; $URL ; cURL options: $cURL ]
Insert PDF [] Insert PDF []
Insert Picture [] Insert Picture []
Insert Text [ Select ] Insert Text [ Select ]
@@ -28,5 +28,5 @@ Send Mail [ Send via OAuth 2.0 ; With dialog: Off ; To: $to ; CC: $cc ; BCC: $bc
Set Session Identifier [] Set Session Identifier []
Set Web Viewer [ Action: Reset ] Set Web Viewer [ Action: Reset ]
Show Custom Dialog [] Show Custom Dialog [ Title: ; Message: "commit"; Default Button: "OK", Commit: "Yes"; Button 2: "Cancel", Commit: "No" ]
Speak [ Text: ; Wait for completion: On ] Speak [ Text: ; Wait for completion: On ]
@@ -0,0 +1,11 @@
Append PDF [ From: File ; “$FilePath” ]
Cancel PDF
Close PDF [ Save to: File ; “$FilePath” ; Create folders: Off ]
Create PDF [ Restore ]
[ Document - Title: $Title ; Subject: $Subject ; Author: ; Keywords: ]
[ Security - Printing: High Resolution ; Editing: Any except extracting pages ; Enable copying ; Enable Screen Reader ]
[ Initial View - Show: Pages Panel and Page ; Page Layout: Single Page ; Magnification: 100% ]
Open PDF [ From: File ; “$FilePath” ]
# ℹ️ The printer and page setup for this step are preserved exactly (carried in the PageFormat/PrintSettings block) and restore byte-for-byte on paste. The readable values below are for reference only — to change any print option, use FileMaker's Print Setup dialog after pasting.
Print PDF [ From: Source ; Source: $FilePath ; All Pages ; Collate: On ; With dialog: Off ; PrintSettings: #blob eJztWdtO20AQfe9XpP4B1nONpSRSsL1v0KjwhlCVEoMiBYJyadW/r2YdB5xL0wASVLUfEns9O3PmzBytvNsZzMYPi4tisRg/3M1bg+Fdcb68/17Mxg93X25v58WiG7moFawup348KbqRH07mRdTqTyZmPu9Gl7NlEbVuppPJcFGMqufz5X06fRybQVx5+PVYdKPT2fTnvBh9LW6ms9E86n1qhaszmAwXt9PZfTZcDFvVQznl7NvgLOp1Pl+lWf+yf4Upem1LJik4FWEFRUnES44ZAMaQowMAJyy5oHghSSQXtbfMTCSQYRsAPeaujynEROQJmThhRwxOnaSSKCqBY8dMQCklhGB+M/DgKdbSisMTMVGwNTtGJnArHPaWKTc8ANJWUlKHfRvXcEEuT75KvFnlURE8OwXx6kKepAlVyLJVhFxISQigzOY59v3slLaBGVSyJ5dgKqfCmmCFooZMDUciuRLkROIFlSUzjpU4+AmzCXJ2lDGqEy9eUhLxCpJJrIQp+CrGKmINwTEYtBZTUEHYYli0zTjm1xgpZ4vu9i598QLP/Zqf+rxXokyUhCWjWEFBYk12IZWnt6uxXUwdh+OtKlbF3WCzimo+45Czlxysa0lkH4uvYdL8hUhMIqnEovuQlvOFRU0LmKMLlhujTzyD3+5J8Js12bY7ohahz8i4EPEl+6uxXGKrUKOTd9PJ0bXZrQi0u6zp/HomvL5ntGx0tTIrrpjGsNIlwoqNBt5LA6+p0t7ei//Ue40a9vOsif1LatkZ0kYXH1sXh+q1Xi9IQdm+HxodHOBVJLGvGCV2llmjgQ+sgYO1alaIN2Tbatzo4l/QxYFK7e1BwBgJFQnbiCjhvtHJkexXrDNIbOONUj6uUg7Xah1xB7qXrS1vpbztrv5/NVnPhGJ2lHB9P3pLgxt7KM52txHKXLa7/8Wskia2n34o/ss7mQ8od5PXYLPet7eR6+te5+T5kchfnZOcTUfPzklcecXee2//Lrbf/Z4vhj8Kc9S7mC5nN0XnZD0QLDontdOi3m810thF ]
Save Records as PDF [ Save to: File ; Create folders: On ; With dialog: Off ]
@@ -1,63 +1,136 @@
# `.fmscript` 0.90 grammar reference # `.fmscript` 0.90 grammar reference
Source: <https://fmscript.org/spec.html> Source: [https://fmscript.org/spec.html](https://fmscript.org/spec.html)
This is a concise working reference to the public 0.90 grammar overview. The This is a concise working reference to the public 0.90 grammar overview. The published page is not yet the complete script-step catalog. When a particular step or parameter variant is uncertain, use the authoritative catalog in `../examples/`, a known-good FileMaker/ai2fm export, or validation with ai2fm; do not infer syntax from another step.
published page is not yet the complete script-step catalogue. When a particular
step or parameter variant is uncertain, use a known-good FileMaker/ai2fm export
or validate it with ai2fm; do not infer syntax from another step.
## Core grammar ## Bracket Rule
- Give a parameterized script step exactly one bracket group containing all of Every script step that has parameters is followed by exactly one bracket group containing all parameters. Steps with no parameters have no bracket group.
its parameters.
- Do not add brackets to a step with no parameters.
- Separate main arguments inside the brackets with a semicolon followed by a
space. Do not use a comma as the main argument separator.
- Use `# ` for a FileMaker comment step.
- Continue the same multiline comment step with `#>`.
- Use `// ` before a script step to represent a disabled step.
- Preserve `//` and `/* */` comments that occur inside FileMaker calculations.
- Qualify field references with their table occurrence, for example
`Customers::Name`. Do not emit a bare `::Name` reference.
- Prefix a local variable with one `$` and a global variable with exactly `$$`.
- Keep simple steps on one line.
- Preserve multiline calculations and determine their boundary using the known
step name, balanced brackets, and continuation structure.
## Representative forms Valid:
```text ```text
Set Variable [ $x ; Value: "Hello" ]
Show All Records Show All Records
Set Field [ Customers::Name ; "Ada" ]
Set Variable [ $name ; Value: Customers::Name ]
Perform Script [ Specified:From list; "Normalize Customer"; Parameter: $name ]
``` ```
Invalid:
```text ```text
# Prepare the payload Set Variable $x = "Hello"
Set Variable [ $payload ; Value: JSONSetElement (
"{}" ;
[ "id" ; Customers::ID ; JSONString ]
) ]
``` ```
The exact parameter labels and internal punctuation belong to the individual ## Semicolon Rule
FileMaker step definition. Verify them rather than generalizing from these
representative forms. Main arguments inside brackets are separated by semicolon plus space. A comma is not a main argument separator.
Valid:
```text
Set Field [ Customers::Name ; "Ada" ]
```
Invalid:
```text
Set Field [ Customers::Name , "Ada" ]
```
## Comment Rule
Dedicated script comments use `# `. Disabled script steps use `// `. Multi-line comment steps continue with `#>`. Inside FileMaker calculation bodies, inline `//` and `/* */` comments are valid and must be preserved.
```text
# Explain the next operation
# Long comment title
#> continuation paragraph that remains part of the same comment step
// Perform Script [ Specified:From list; "Legacy Step" ]
Set Variable [ $x ; Value: Let ( [
a = 1 ; // inline calculation comment
b = 2 /* block calculation comment */
] ; a + b ) ]
```
## Field Reference Rule
Field references include both table occurrence and field name. Bare `::FieldName` references are invalid.
Valid:
```text
Set Field [ Customers::FirstName ; "Ada" ]
```
Invalid:
```text
Set Field [ ::FirstName ; "Ada" ]
```
## Variable Rule
Local variables start with one `$`. Global variables start with exactly two `$$`.
Valid:
```text
Set Variable [ $counter ; Value: 1 ]
Set Variable [ $$APP_MODE ; Value: "review" ]
```
Invalid:
```text
Set Variable [ counter ; Value: 1 ]
```
## Step Boundary Rule
Simple script steps are compact, but 0.90 preserves multi-line calculation bodies and multi-line comment steps. Boundaries are determined by known step names, balanced brackets, and continuation tokens, not by blindly flattening every real-world step.
```text
Perform Script [ Specified:From list; "Parse Result"; Parameter: Get ( ActiveLayoutObjectName ) ]
Perform Script [ Specified:From list; "Parse JSON"; Parameter: JSONSetElement (
"{}" ;
[ "id" ; Customers::ID ; JSONString ] ;
[ "name" ; Customers::Name ; JSONString ]
) ]
# Summary
#> This paragraph continues the same FileMaker comment step.
```
## Representative syntax.
The formal catalog covers the complete FileMaker step index. These examples show the public grammar style for common patterns, including 0.90 multi-line preservation.
`common-patterns.fmscript` — valid
```text
Go to Layout [ "Customers" (Customers) ]
New Record/Request
Set Field [ Customers::FirstName ; "Ada" ]
Set Field [ Customers::LastName ; "Lovelace" ]
Commit Records/Requests [ With dialog: Off ]
Perform Script [ Specified:From list; "Normalize Customer"; Parameter: JSONSetElement (
"{}" ;
[ "id" ; Customers::CustomerID ; JSONString ] ;
[ "fullName" ; Customers::FirstName & " " & Customers::LastName ; JSONString ]
) ]
If [ Get ( LastError ) = 0 ]
Show Custom Dialog [ "Saved"; "Customer created." ]
End If
```
## Review checklist ## Review checklist
- Use an exact, supported FileMaker step name. - Use an exact, supported FileMaker step name.
- Give each parameterized step one balanced outer bracket group. - Give each parameterized step one balanced outer bracket group and give parameterless steps no bracket group.
- Keep calculation parentheses and internal brackets balanced. - Keep calculation parentheses and internal brackets balanced.
- Use semicolons for main arguments. - Use semicolon plus space for main arguments.
- Fully qualify every field reference. - Fully qualify every field reference.
- Use `$` and `$$` variables correctly. - Use `$` and `$$` variables correctly.
- Close every structured block with the complete matching FileMaker closing - Close every structured block with the complete matching FileMaker closing step.
step. - Preserve comment steps, disabled steps, calculation comments, and multiline calculation boundaries.
- Preserve comment steps, disabled steps, and calculation comments correctly.
- Preserve multiline calculation boundaries.
- Apply the project's formatting, naming, path, and output-only requirements. - Apply the project's formatting, naming, path, and output-only requirements.
- Validate uncertain or version-specific syntax through ai2fm or a known-good - Validate uncertain or version-specific syntax through ai2fm or a known-good export before describing the script as round-trip ready.
export before describing the script as round-trip ready.