Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4797 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

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.

This topic is 4797 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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