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 Management

Featured Replies

Hi all, I'm trying to make my code, more efficient. As far as I understand, global variables take memory that filemaker might use for other tasks. So, if this statement is correct, how would I free that memory? Should I set my variables to "" after using them? Any other way to do it? Thanks Regards. Mariano

Why are you using global variables in the first place?

Do you really need them?

Can you describe how you use them?

  • Author

Hi BruceR, thanks for your answer

 

Let me give you my quick example which, by the way, doesn't mean I'm doing things right (at all)

I have three layouts, L1, L2 and L3. I want to navigate from L2 or L3 to L1,

In L2 and L3 I have a button, that basically says: "Go to L1:, and in L1 I have a "Go Back" button which takes me back to the layout I'm coming from.

The way I have managed to achieve this, in L2 or L3 is setting a global variable $$myLayout, and assign the value of the layout with the Get (LayoutNumber) function when I press a button on L2 or L3. Then my "Go Back" button in L1 is a Go to Layout, script step and in the specify drop down I use "Layout Number by calculation" in which I use the $$myLayout content.

I've tried with the GetScriptParameter function, but the issue is that in L2 or L3, when my script finishes sending me to L1, then I cannot get the parameter as the value doesn't last after the script finishes.

Have I explained my self? Can I do this in a way avoiding Global Variables?

Yes, that is a good use for global variables.

But - this whole thread is about setting a single global variable?

If that's all you're doing, then you are a very long ways away from having any issue with globals and memory.

Please real field, layout, script, etc. named when describing your needs. This helps us see the logic in your schema.

 

You can also attach a file, see here LINK on how to do this. A file will often help us to speed up the process of solving your questions.

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.