Testing the plug-in
The functionality of the Server plug-in is exactly the same as the client plug-in, with the exception that there is no graphical user interface, so dialog functions will not work. Many scripts that work inside FileMaker Pro with the Client plug-in will also work on the FileMaker Server using the Server plug-in.
Important notes when working with the Server Plug-in
- Scripting for the Server plug-in is created using the Client plug-in inside FileMaker Pro. This means if you want to create scripts that use the Server plug-in, you must install the Client plug-in in FileMaker Pro, even if you only want to actually use the Server plug-in. This is needed because FileMaker Pro needs the plug-in's external functions available in the Script Maker/Script Workspace when creating a script. If the Client plug-in is not installed in FileMaker Pro when you are creating a script, there is no way to insert the plug-in's functions into your script. The Client plug-in does not have to be registered for this, and can be running in demo mode.
- The graphical user interface functions (e.g. any function that shows a dialog) are not supported in the Server plug-in. This is because there is no place for the Server plug-in to display a dialog in a Scheduled script or in Web Publishing (i.e. in a web browser). See the Unsupported Functions section for more information.
- Make sure your scripts do not use any script steps that are not compatible with FileMaker Server or Web Publishing. This may cause a script to stop prior to getting to a step that uses the SE plug-in, making it seem as though the plug-in is not working. To check this, open the Manage Scripts dialog inside FileMaker Pro, edit your script, and set the "Show Compatibility" option in the bottom left corner to either "Server" or "Web Publishing".
- When working with files, the Server plug-in can only access files within the FileMaker Server directory. Because the plug-in is simply an extension of FileMaker Server, it has the same privileges as FileMaker Server, so it only has permissions to read/write in the FileMaker Server directory. You can also use FileMaker's built-in Get(DocumentsPath) and Get(TemporaryPath) functions to give you valid file paths to work with.
- When running scripts on FileMaker Server, there is no user interface or debugging tools like in FileMaker Pro. This makes working with the Server plug-in harder than the Client plug-in. Because of this, writing the results from the Server plug-in function calls to your database is very important. If the results are not saved in the database, there is no place for you to look when the scripting/plug-in does not work as intended. To do this, make sure to call the plug-in's functions in a Set Field script step and set the Target Field to non-global text field. When setup like this, after running your script on the Server, you can open your database remotely in FileMaker Pro, and then look at the non-global text field for the results from the Server plug-in.