Files
filemaker-ai-core/skills/filemaker-fmscript/references/fmscript-0.90.md
T

2.5 KiB

.fmscript 0.90 grammar reference

Source: https://fmscript.org/spec.html

This is a concise working reference to the public 0.90 grammar overview. The 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

  • Give a parameterized script step exactly one bracket group containing all of 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

Show All Records
Set Field [ Customers::Name ; "Ada" ]
Set Variable [ $name ; Value: Customers::Name ]
Perform Script [ Specified:From list; "Normalize Customer"; Parameter: $name ]
# Prepare the payload
Set Variable [ $payload ; Value: JSONSetElement (
  "{}" ;
  [ "id" ; Customers::ID ; JSONString ]
) ]

The exact parameter labels and internal punctuation belong to the individual FileMaker step definition. Verify them rather than generalizing from these representative forms.

Review checklist

  • Use an exact, supported FileMaker step name.
  • Give each parameterized step one balanced outer bracket group.
  • Keep calculation parentheses and internal brackets balanced.
  • Use semicolons for main arguments.
  • Fully qualify every field reference.
  • Use $ and $$ variables correctly.
  • Close every structured block with the complete matching FileMaker closing step.
  • Preserve comment steps, disabled steps, and calculation comments correctly.
  • Preserve multiline calculation boundaries.
  • Apply the project's formatting, naming, path, and output-only requirements.
  • Validate uncertain or version-specific syntax through ai2fm or a known-good export before describing the script as round-trip ready.