1 2 Previous Next 21 Replies Latest reply on Feb 27, 2013 10:02 PM by LyndsayHowarth

    Filemaker API




      I'm working on a project that requires a outside application to talk to Filemaker.


      The reason for the request, I am looking at an external application that will be dealing with file transfers, sending information and file/s that are to be loaded into Filemaker. What I would like to do, rather than have filemaker running a looped script that looks at a specific folder to see if file/s have been loaded and are complete, I would like my external application to send a 'message' to filemaker saying... 'Hi, I'm ready and waiting'..


      Is there a location where I would find information relating to Filemakers API? or am I missing something entirely, and is this all contained with Filemaker Plug-ins?


      any help greatly appreciated.





        • 1. Re: Filemaker API

          There are two open standards for calling data from most databases, including FileMaker, and they are ODBC and JDBC.  And most web developers use the PHP API to connect to FileMaker.  It is pretty unusual not to be able to solve communiation with FileMaker via one of those 3 things.  How about telling us more about what is trying to talk to FileMaker?  Is it a program?  A database?  A web page? 

          • 2. Re: Filemaker API

            PHP File commands can check a folder for new files and when a new file is added can notify FileMaker using the API commands. If the files are named according to a filepath which has components to match with FileMaker records you can figure out WHICH records need to be updated.


            There are also plugins you could use for this purpose including the Troi file and a couple of others.


            Sent from my iPad

            Lyndsay Howarth

            11th Hour Group Pty Ltd

            • 3. Re: Filemaker API

              Another thought is that you seem to believe you need a continuously looping FileMaker script to look in some folder.  You don't have to do that.  You can run a schedule script that checks if a folder has something in it or a particular file/folder and have it check say every 5 or 10 minutes or once a day or whatever frequency you want.  Personally, I use ScriptMaster a lot for doing file manipulation from FileMaker because it is a free plugin that works on the server too.  But there are many other file manipulation plugins for FileMaker that will let you check for presence of a file, its size, creation date, change file name, delete file, create folder, delete folder, etc. 

              • 4. Re: Filemaker API

                Taylor, Lyndsay,


                Firstly, thank you both for your responces.


                For a bit more depth into what it is that I am trying to acheive, I am currently looking at publishing my FileMaker DB through a Citrix XenApp interface. The only problem that this currently raises for me is the interaction of clients and uploading and downloading files too and from the Database.


                There is a Developer local to myself which has developer an Application that utilises the 'COM' (Not the right term, but for the purposes) ports that are create and used for Citrix. Within these COM ports, messages and files can be sent, This replaces the need to map the end users 'drives' to the Citrix Server. So, embedded within the Application that sends and recevies messages, a file would be transferred from the Client Machine to the Server.


                This is where the problem comes in, rather than have filemkaer looking at the Location to see that the File has arrived (could be large files, or even multiple files), I would to be able to code the application to send a message to Filemaker to say 'I'm Ready'..


                The form in which this would be used, when a User clicks, Upload file [Potential Pause Script here], the Citrix COM's Application is sent a command, which would open a Select File dialog on the Client machine. The client clicks 'OK' when done, and the files are transferred back to the server. This is where I would like the Citrix App to tell Filemaker that it is ready [UnPause Script and Upload files].


                I hope that this helps and explains why I'm looking for API's.



                • 5. Re: Filemaker API

                  You could write a batch file that sequentially runs the Citirix App and the FileMaker script.  Just use script scheduling in FileMaker on the server to sequentially schedule these two scripts. (For those who are asking, yes, FileMaker can schedule an external non-FileMaker batch file).  


                  Is there a reason for not using FileMaker to publish the data live via ODBC or JDBC or PHP?  That way you don't have to do these updates and people can see the live data.  You can make them read-only if you want.  But dumping the entire file on a regular schedule can get to be a bandwidth hog.  There are reasons to do it sometimes like where you are sending it has better WAN connection than where FileMaker lives.  But live connections are almost always preferred when they don't exceed bandwidth limitations. 


                  And if you do periodicaly wan to publish a FileMaker database, set a schedule script to have it save the file and after that, have FileMaker move it to the folder you want and maybe delete the last version or whatever.  All very doable in FileMaker scripting. 

                  • 6. Re: Filemaker API

                    Sorry, I think I may have missed out a vital piece of information here, This is for when Users and to attached documents to an existing DB;


                    Insert File [] to a container field.


                    So Like Word Doc's. PDF's, Jpg's etc.

                    • 7. Re: Filemaker API

                      You can have a schedule script that runs every once in a while and looks in a folder and imports any documents in that folder into FileMaker container fields and then goes back and erases them after importing.  Is that what you are trying to do? 


                      PS:  I would use ScriptMaster plugin to get the folder contents to see what needs imported and then delete files aftewards. 

                      • 8. Re: Filemaker API

                        The Process is what I want to acheive, I'm jus trying to avoid scripting the process. The Reason being here, is that say a user wanted to attached a file to an e-shot, do not want them to have to wait for the scheduled script to run and load the file.

                        • 9. Re: Filemaker API

                          Why have a user wait? ... run a schedule script on the server.  It won't interupt any end user. 

                          • 10. Re: Filemaker API

                            if you are lucky enough to be on a Mac,  you can control the whole process with Applescript




                            > The reason for the request, I am looking at an external application that will be dealing with file transfers, sending information and file/s that are to be loaded into Filemaker.

                            • 11. Re: Filemaker API



                              Firstly, thank you for the response.


                              Could you possibly expand on this, if there is an inteface that works on a MAC, through Applescript. I would like to assume that this is based on a level of code, be that C++ or somethig similar. This could be transposed to a Windows environment, with some manipulation.



                              • 12. Re: Filemaker API

                                if you Google  "FileMaker Applescript"  you will find hundreds of articles and code examples


                                but this can not be ported to Windows


                                Google "filemaker visual basic" for a possible equivalent





                                > This could be transposed to a Windows environment, with some manipulation.

                                • 13. Re: Filemaker API

                                  My bad... I misread your response, so ignore my previous response. 


                                  So you don't want to wait for a schedule script.  That means that the user would start the process by say clicking on a button and it happening immediately.  The only external way of starting a FileMaker script that I know if is with PHP (well, yes, you can with AppleScript, but that is a single solution). 


                                  I guess I am still not understanding why you want the process to run or be triggered outside of FileMaker since a button inside of FileMaker just seems so simple to me. 


                                  I have a situation that may be similar to yours.  I have a folder that a scanner sends files to (scans of checks).  When I want the last scan imported into a container field, I hit a button that runs a script that looks in the folder, gets a list of the files, and filters out only scanned images and then sorts to see what th most recent one was and imports it into the container field.  It all happens very quickly.  I have a second button to import all the images in the folder into the database too if I want a batch import of a lot of images.  FYI, my images are checks, but they could be documents or other binary files.  You can have the user select the folder to import from or you can have it default to say the pictures folder on a given user account. 


                                  My recommendation is that you only look for outside scripts and programming solutions when FileMaker can't do it itself because integrating an outside API always has a lot of additional challenges.  And importing container/binary data starting from outside of FileMaker often does not work easily.  But one thing you might want to look at if you want to remotely trigger a FileMaker script is http://www.360works.com/remotescripter/

                                  • 14. Re: Filemaker API



                                    The reason for the 'External App' to process a trigger;


                                    I'm Looking to server my DB through Citrix, meaning, there will be no FM installed on the local Client machine. So, if I present a button that says 'insert' and a dialog box is opened, this will by default point to the actual Citrix Servers User Documents folder. This can be changed by Mapping a drive to the Client Machine through Citrix and that become the default, but that is just opening a hole in my Hosted network to allow people to potentailly dump a vrius onto my server, so this is a no no.


                                    So, the next thought process, is there a way that I can get the server and the client talking, I came across this developer, who has already built the communication channel protocols. This allows for message transfer, Server to tell Client to open local 'Excel' application for example.


                                    Next challenge, how to transfer files between the Client and Server, Small application that the Server tells to open on the Client machine, this is then the dialog box for selecting files that are to be transferred to the server. When finished selecting files, the Small App then sends the files to the server through the Citrix Comms Channels, they are virus scanned. Wonderful.


                                    It is at this point that I get a little stuck. I want the Server side of the Small App to then tell Filemaker, I have these files that you are waiting for. You can do what you like with them now.


                                    This whole process could quite simply be, when the user clicks the 'Insert File' the the script is paused... the Small App does it's thing, and once the files are on the server, the server side Small App that has received the files says to FM, unpause your script, and FM then looks at the folder and imports/references X number of files.


                                    This is the whole reason for the API, how would I go about telling FM to unpause...


                                    I hope this helps to understand more what I am trying to acheive.

                                    1 2 Previous Next