Set Field and Set Field By Name in FileMaker scripts

Beginner

Set Field writes a value into a specific field. Set Field By Name uses a calculated field name, enabling dynamic field targeting. Learn both steps and when to use each.

What you'll learn

  • How to use Set Field to write a value to a specific field
  • How Set Field By Name lets you target a field by a calculated name
  • When each variant is appropriate

Set Field is the primary way to write a value into a field from a script — and Set Field By Name extends that power by accepting a field name as a calculation, letting you target fields dynamically.

1/2
1

Write a value to a field with Set Field

Set Field takes a field reference and a value expression. The field does not need to be on the current layout — you can target any field in a table the layout has access to.

FileMaker Script
# Set a single field
Set Field [ Contacts::lastName ; "Doe" ]

# Set from a variable
Set Field [ Contacts::phone ; $phone ]

# Set a calculated value
Set Field [ Orders::total ; Orders::subtotal * ( 1 + Orders::taxRate ) ]

Sign in to track your progress and pick up where you left off.

Sign in to FM Dojo