Dynamic field targeting with Set Field by Name

Expert

Use Set Field by Name to write to a field whose name is computed at runtime, enabling generic scripts that work across multiple fields.

What you'll learn

  • How Set Field by Name differs from Set Field
  • How to construct the fully-qualified field name expression
  • How to loop through a list of fields and set each one dynamically

Set Field by Name accepts a text expression that resolves to a fully qualified field name (TableName::FieldName) at runtime. This lets one script step replace a family of nearly identical Set Field steps and is essential for building generic, reusable scripts.

Stuck is a valid status

Need a second brain on this one?

If this lesson just collided with your real schema, script stack, or deadline, book consulting and turn the confusion into a concrete plan.

Book consulting
1/3
1

Basic usage

The first argument is a text expression that evaluates to "TableOccurrenceName::FieldName". The second argument is the value to set.

FileMaker Script
Set Variable [ $fieldName ; Value: "Contacts::LastName" ]
Set Field by Name [ $fieldName ; "Smith" ]

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

Sign in to FM Dojo