2 Replies Latest reply on Jan 29, 2015 7:23 PM by itiming

    How to mirror values in an updating text file to a FM 12 table?


      I have an electronic machine writing timing strings to a csv file which looks like this:


      TimerOutput File:














      Each time an event occurs, another line of text is written to this text file.

      Over a day, there will be 500 to 50,000 text strings added to this file.


      To begin, I am manually importing the file with these text strings into a RawData field created in my FileMaker 12 table.


      Then, after a while, when more records have been added to the TimerOutput file, I make the next import looking for only the newly created (since my prior import) records and import those.


      I would like to work out an automated way to mirror the records as they are written into the text file to records in a Filemaker table.


      As a first try, I imported the subsequent TimerOutput file into Filemaker using the "Create New Table" on import.

      Then I have two table occurrences in Filemaker; one is the full TimerOutput file (which gets replaced with each import); the other is my working set of records that gets updated by adding new records from the full file.


      The markers I can use to check for new records are the 2nd field (serial number) and the 4th field (time); which both increase through the day.


      BTW, the text strings can be output via a direct socket connection if anyone could suggest a protocol/method to connect with FM 12.


      Thank you for any advice on an automated approach.

        • 1. Re: How to mirror values in an updating text file to a FM 12 table?

          The way this is set up creates a lot of redundant and useless work.


          If you could have the electronic machine stop writing to the same file from time to time and create another, new file, everything would be much easier.


          We do have a similar situation at a client - there's a weather machine outputting a csv data file with 5 - 100 lines every 30 minutes to a ftp location. The filemaker database connects to the ftp site (we're using the 360Works FTPeek plugin for this), gets the directory, downloads every file and then deletes each downloaded file from the ftp directory. Every file is read into a text field of a new record in an import table, then the text field is processed (and split into single records, into another table). The import record is marked as "processed". Everything works flawlessly, no checking needed.


          Maybe you can recreate such a scenario ?

          • 2. Re: How to mirror values in an updating text file to a FM 12 table?

            Thank you for the recommendation. Yes, it is much less complicated to update/add to my local FM file when the source file writing is suspended periodically. I can make this happen; so that on import, only newly created records are added.


            I am thinking that my goal will be to have a solution which scripts passing the records from the source via a socket connection to my FM table. Not sure which scripting language would suffice.