1 Reply Latest reply on Jun 19, 2013 3:42 PM by philmodjunk

    Auto import newly created Excel files on server

    straka_sh

      Title

      Auto import newly created Excel files on server

      Post

           We have a web Form that is filled out by subcontractors of clients and saved into an online Data Storage.  Normally, we convert that to a .csv/Excel file and then import that file into our the separate FMP solution we have for each client.  We have 25+ different clients who each have 20+ subcontractors that may fill out a form on a daily basis. 

           So, in other words, each FMP file (client) we have, they want the information available to them as "real time" as possible.  Which means that we have to save each online Data Storage update as a .csv/Excel and import into appropriate FMP file multiple times per day, which is tedious.

           What our company would like to do is automate this.  We have developed a code to automatically (each hour) take new additions to the Data Storage and save them as a new/separate Excel file on our server in a folder.

           Now, I'm trying to figure out how I could script this to import into FMP as automatically and easily as possible?  I can't overwrite the data in the FMP file, because the client wants access to it.  Since there will be multiple files, each with a different file name, based on the batch order saved, I need to have each file recognized by the script, and then imported (added to the records already brought in). 

           I could envision this as a button that would "Import new files from server."  But again, would only import files in that client's folder that haven't already been brought in.  Without all the manual stuff we normally have to do, over and over again each day.

        • 1. Re: Auto import newly created Excel files on server
          philmodjunk

               This can be done once you can get a list of all the files in the specified folder. You will need either a plug in or a system script to get that list of file names.

               Once you have that list, a script can loop through the list of file names, importing those that have not already been imported. (A table in your database can store the filenames of each file when it is imported so you can keep track of which ones have already been imported.)