The Original FileMaker Community
Business Templates - Demo Apps - Video Tutorials -Samples - Help - 46000 Member Forum

The Leading Filemaker Developer Tools

The FileMaker Set Variable Script Step – FileMaker Today

Get real time updates directly on you device, subscribe now.

Well, I’m not going to even try to cover all the power and flexibility of the Set Variable script step here. It could almost be a topic that could be it’s own small…

This powerful addition to FileMaker 8 allows you to set a name, a value and a repetition to the computers internal memory.

The FileMaker Set Variable Script Step

You have two choice of a local variable and a global variable. Each has it’s own unique advantages and drawbacks. I’d have to say the local variable is probably more commonly used simply because FileMaker will define a variable as local by default.

A local variable is defined by adding a single dollar sign in it’s name such as $InvoiceNumber, $ClientID or $Counter. A local variable will store it’s information within a script while that script is running. After the script is finished in it’s execution, the defined local variable will have no value. An advantage of this is like a disposable lighter. When you are done, you throw it away because you never intend to refill it.

A global variable is defined by adding a two dollar sign characters in it’s name such as $$InvoiceRange, $$Array or $$UserPrefs. A global variable will store it’s information within the entire file while the file is open. This way it can be used across scripts or even in-between times that scripts are called upon.

As much as you might think that a global variable would be available from two different FileMaker files during the same session, that is NOT the case. In order to pass data like that between different files, you will need to use global fields or a script result.

Move Portal Row Data Via Variables is a post that includes a real world example of script variable.


More info about the author and FileMaker in general, contact me at This email address is being protected from spambots. You need JavaScript enabled to view it..

© 2007 – Dwayne Wright –

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More