Jump 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.

AppleScript to get FM global variable

Featured Replies

I'm familiar with utilizing Calculated AppleScript or setting a global field to a value and then reading it from AppleScript. But is there a direct method for AppleScript to get a FM global variable from outside of the FM application, ie. for AS app, is there a way to say:

tell application "FileMaker Pro" to tell database "myDB" to set v to { get filemaker global variable named "gv" }


 

Don't have a Mac so can't test for you, and don't know too much about AppleScript.

Can you invoke a FM script with AppleScript? If so, can you grab the exit value if one is specified in the FM script? (ie, Exit Script [ value ])? If yes, you could create a simple script that returns only the global variable you're after.

3 hours ago, McScripta said:

 is there a direct method for AppleScript to get a FM global variable from outside of the FM application

No.

  • Author
21 hours ago, OlgerDiekstra said:

Can you invoke a FM script with AppleScript? If so, can you grab the exit value if one is specified in the FM script? (ie, Exit Script [ value ])? If yes, you could create a simple script that returns only the global variable you're after.

Thanks for suggesting it. Yes I can invoke FM script but to my knowledge it will not return its result to AS... I'm afraid @comment is right about this one.

12 minutes ago, McScripta said:

to my knowledge it will not return its result to AS

Correct, it won't. Why can't you use a global field?

Create an account or sign in to comment

Important Information

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

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.