1 2 Previous Next 16 Replies Latest reply on Apr 19, 2016 1:13 PM by taylorsharpe

    Start pro from server



      Is there a way to get Filemaker Server to start Filemaker pro on same computer and run a script?

        • 1. Re: Start pro from server

          FMS can run scripts. However, if you need to run a script that is not supported in FMS you can have a robot client do it. That robot can be installed on the server machine, but it is not advised. Pro would need to be open and connected to the server for this to work. Getting FMP to open and close is a whole other bunch of work.


          How you make this happen really depends on what type of script you are running and how often.


          360Works has a Remote Script plugin that can do this if you do not want to bother setting up something on your own.

          • 2. Re: Start pro from server

            Goya has a very useful plugin called BaseElements that has a lot of functions helping with API functionality and file level manipulation and a bunch of misc. things.  The license is free, which makes it very popular.  It has a couple of commands in the Misc. section that could help you fire off a program:  Miscellaneous – BaseElements Plugin Help Centre  But as bigtom said, you can't natively do this in FM without a plugin. 

            • 3. Re: Start pro from server

              taylorsharpe I have sometimes set a robot running an on timer script to check for a condition on a field that FMS sets with a scheduled script or another client sets somehow. If the condition is met the robot runs the needed script. If you need this in real time, I have had decent results running the on timer script every 2-3 seconds. No plugin required. I would not do this on the FMS machine. BE is pretty cool and useful.

              • 4. Re: Start pro from server

                I would try this


                The fly in the ointment is the inability to use the open URL script step as it isn't server safe. Neither is Set Web Viewer so that rules out that trick. I would persevere with this approach as it will start filemaker, allow you to authenticate and do all sorts of cool stuff.  There are plugins, like the MonkeyBread or ScriptMaster, that will call a URL.


                Another alternative would be to have filemaker running constantly on the server and use the delete record trick to fire the script


                But obviously this fails if filemaker isn't running. Maybe an applescript or cron to make sure filemaker pro is running?

                • 5. Re: Start pro from server

                  I have tried using the insert from url script step as this works on server but I don't think it likes the amp protocol.

                  • 6. Re: Start pro from server

                    Also tried Export Records with automatically open checked. This didn't work either. However, assuming you are on OS X, Attaching a folder action Applescript is possible. This seems to work although it requires your server to be logged (although to run FileMaker you need to be logged in too) in and you will be allowing the execution of code on your server from other machines which may be a security concern.


                    Here is the applescript, you need to export a return delimited list of URLs in the url.text file (Tweaked to make work with folder actions; I always forget the on adding folder items) :


                    on adding folder items to this_folder after receiving added_items

                      set locations to paragraphs of (read ("/Library/FileMaker Server/Data/Documents/url.text"))

                      repeat with aLocation in locations

                      tell application "Safari" to open location aLocation

                      end repeat

                    end adding folder items to


                    • 7. Re: Start pro from server
                      Magnus Fransson



                      Might these two resources be helpful?


                      Opening shared databases remotely using a URL (1)

                      Opening shared databases remotely using a URL (2)


                      Best regards Magnus Fransson.



                      I have not researched this myself so i honestly do not knew fore sure. But it seams to me that you could "hoist" a separate FMP from either a OS scheduler or maybe even a FMS script?

                      • 8. Re: Start pro from server

                        You've got a bunch of reasonable answers. I've got a question...Why do you want to do this?

                        • 9. Re: Start pro from server

                          I must admit I would like to know that too :-) It is pretty cool, though, being able to create an instance of FileMaker instead of having a robot in a looping script.

                          • 10. Re: Start pro from server

                            you're right, lots of great feedback.


                            So as you know you can't print from server, I have a database that will email customers 30 days prior to expiring, If they do not have a email then it prints a letter. Cents FileMaker server cannot do that print part I would like to have this server start the script  in FileMaker Pro.


                            I tried to get  FileMaker Pro to start up based on time and run the script, however it will not find the file on the server looks for it locally.


                            Thank you everyone for your input

                            • 11. Re: Start pro from server

                              DamianKelly wrote:


                              I must admit I would like to know that too :-) It is pretty cool, though, being able to create an instance of FileMaker instead of having a robot in a looping script.


                              Not a big fan of running a user-level application on the database server.


                              A robot does not need to be in a looping script: you can use the FM ActiveX API on Windows or the Apple Events API on Mac to make FM do things on a robot machine.

                              • 12. Re: Start pro from server

                                Well...after the FMP prints the letter, then what? It's still got to be mailed by a human, right? Why not have that human do the printing? Or be forced to, say with a script that runs on start up?

                                • 13. Re: Start pro from server

                                  FWIW, I saw this thread title and hopped on hoping for a slick answer....I need to do a scheduled import, but the script can't fire from the server...I was hoping that a server could light up a client and run it from the client as needed...


                                  It was back on this thread...

                                  Server Scheduled Script

                                  • 14. Re: Start pro from server

                                    Yeah I feel the same, hence the comments on having the server logged in and the security concerns.


                                    But the FMP url is super handy. Its a lot easier to make interactions with other computers. Our system pings emails with URLs in that do all sorts of stuff. For example when goods in book in a delivery it emails whoever placed the PO telling them the order is in and the email has a URL in that takes the user to the appropriate record, of course this works on Go as well as Pro. Another one is our VOIP phones can fire a URL on an incoming call so I can open a new window and take the person to the callers record.

                                    1 2 Previous Next