FileMaker Set Variable — scope, naming, and when to use it
BeginnerUnderstand the difference between local and global variables, when to use each, and the naming conventions that keep scripts readable.
What you'll learn
- The difference between local ($) and global ($$) variable scope
- Naming conventions that make scripts easier to read and maintain
- When to use repetitions and why you usually do not need them
Set Variable is one of the most-used script steps in FileMaker. Understanding the difference between local ($var) and global ($$var) scope — and knowing when each is appropriate — prevents subtle bugs that are hard to track down.
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.
Local variables: $ prefix
A local variable ($name) exists only for the duration of the currently running script. When the script ends, the variable is cleared. Local variables are the right choice for most scripting work.
Set Variable [ $customerId ; Value: Customers::id ] Set Variable [ $count ; Value: Get ( FoundCount ) ] Set Variable [ $result ; Value: "" ]
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo