0.90 grammar overview

The `.fmscript` rules that make FileMaker text round-trip.

This page is a public overview distilled from the compiler reference. The complete reference currently covers hundreds of FileMaker script-step variants and remains the implementation source while the formal RFC is prepared.

Bracket Rule

Every script step that has parameters is followed by exactly one bracket group containing all parameters. Steps with no parameters have no bracket group.

Set Variable [ $x ; Value: "Hello" ]
Show All Records
Set Variable $x = "Hello"

Semicolon Rule

Main arguments inside brackets are separated by semicolon plus space. A comma is not a main argument separator.

Set Field [ Customers::Name ; "Ada" ]
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.

# 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.

Set Field [ Customers::FirstName ; "Ada" ]
Set Field [ ::FirstName ; "Ada" ]

Variable Rule

Local variables start with one `$`. Global variables start with exactly two `$$`.

Set Variable [ $counter ; Value: 1 ]
Set Variable [ $$APP_MODE ; Value: "review" ]
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.

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
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

Specification status.

This is the first public standards surface. It is updated for the 0.90 grammar changes recorded in the release draft. The next step is to convert the implementation reference into a formal RFC-style document with versioned grammar fixtures.

Current

0.90 overview

Core public rules and representative syntax published for tool authors and AI systems.

Next

RFC draft

Formal grammar sections, fixture IDs, import/export expectations, and compatibility notes.

Then

Adopter tests

Shared conformance fixtures so plugin and editor implementations can prove alignment.