Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"Variables in use" list?

Featured Replies

Im pretty new to FileMaker and have a 2 part question.

 

First, I wanted to know if there is somehow a current list of $ and $$ Variables used in scripts?

 

The reason I am asking is to avoid potentially using the same variable name for two different purposes within scripts. I suspect this comes largely down to "proper development principles" to avoid such a conflict, however that sort of "evaluation" feature wouldn't hurt anybody. This is prompted by the fact that I had the same variable name in two seperate scripts; one to filter a portal and the other to set an FK (I caught it before it went into action, and upon further inspection one was global and the other was local, so it would've been fine - but this is obviously an isolated event and I can't help but feel I'm doing something quite poorly).

 

Second, is there a "go to" guide for a sort of "Industry Standard?" I've noticed a lot of people use the same/similar formats such as (for fields) cValue, gLength, etc to help identify.

 

Any other advice related to this situation, no matter how loosely, is greatly appreciated.

A local variable is only valid for the script in which it is set. A global variable persists for the entire time a file is opened. I tend to name both kinds with a name which has meaning for its purpose. The same name can be used and set in many different scripts but the purpose is the same. It could be something as simple as Get(CurrentDate) which many scripts might use. Of course, it has to set per script and there could be a good reason NOT to make it $$.

Rick.

  • Author

Yes, I found I've been trying to use $$ only when absolutely necessary with the preference to use $ whenever possible. $$ seems to inherently pose the possibility for innaccuracy and/or headaches making sure you clear them at the "proper times."

If you have FileMaker Advanced, you can run a DDR report, which gives you all the details on the database structure, scripts, etc.  And you can find all the variables by searching the HTML document it creates.

 

One note, there is a way to set a $ variable that persists outside of a script or calculation...but it's use is rarely inside a novice's toolbelt.

How, Josh? Curious.

A variable in a Let () statement, set via Conditional Formatting, or a calculation field (an auto-enter), or tooltip will set the variable and it will persist semi-Globally.

Calculations can also refer to local ($) variables which are fed their value for current-record evaluation via script.  I have yet to find a reason to use it but I know it works (I've tested) and I know it can be useful (because Ray Cologon said it).

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.