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.

Determining whether a function is present in a plug-in

Featured Replies

Is there any way to get a list of the functions in a Scriptmaster plug-in into Filemaker so I can see if a specific function is available to use?

I realise that I could call the function to see if it returns an error, but in this case it is the ChooseFile function and I don't want to confuse the user by putting up a dialog box for no obvious reason if that function is present

Thanks

Brian

Brian,

Are you wanting to view the functions available yourself during development? You can see that in a calculation dialog under "external functions." Everything should be listed there under the name of the plugin you created. Any user with the plugin installed and registered would have access to those functions in the solution file.

  • Author

No, that's not the issue. I'd like to be able to determine though a script whether a function is available in a plug in or not. I can't call the function to see if it is present because in this case it would cause a dialog to open, confusing the user.

Brian

Are you creating a plugin using ScriptMaster with the Choose File module included?

When you register the function in the solution with RegisterGroovy, you can check for it to return "ERROR". Something like this:

If [RegisterGroovy( "ChooseFile( startingPath; prompt )" = "ERROR"]

Show Custom Dialog ["Could not register function"; SMLastError]

End If

Of course you could handle the error by simply not using the function instead of showing a dialog to the user. Hope this helps.

The other thing I should mention is that the plugin will return '?' if it is not installed so you should do error checking/handling for that as well. You could also run auto-update to make sure that the client installs 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.