4 Replies Latest reply on Oct 11, 2012 10:24 AM by noto

    Recurring import script



      Recurring import script


           Hello, I´m trying to make a script that every time you open the database imports an excel. The excel is in a folder, and every day there´s a new excel in that folder. I want to import the new one. But I can import all of them too without problem if there´s no other way.

           I´m using FMP 11.

           Is this possible to make?

           Can you help me?


           Was I clear?

           Thanks in advance!!!

        • 1. Re: Recurring import script

          How do I set up a recurring import in FileMaker Pro?
          Answer ID: 7532Last Updated: Sep 19, 2011



          Home > Sharing data > Saving, importing, and exporting data > Importing data into FileMaker Pro > Setting up recurring imports

               To set up recurring imports:
                                        Create a new file or open the file in which you want to set up recurring imports. See Creating a FileMaker Pro file or Opening files.
                                        In Browse mode, choose File menu > Import Records > File.
                                        For Files of type (Windows) or Show (Mac OS), select the type of file you want to import. For example, choose Excel Workbooks (*xlsx).
               For a list of supported file types, see Supported import/export file formats.
                                        Locate and select the file containing data you want to import.
                                        Select Set up as automatic recurring import, then click Open.
               The path of the file you selected appears in the Recurring Import Setup dialog box.
                                        To skip importing column headings, select Don’t import first record (Contains field names).
                                        Accept the default layout name or type a new name for the layout FileMaker Pro will create to display the imported data.
                                        Accept the default script name or type a new name for the script you can use to update data manually.
                                        Click OK.
                                        If you are importing data from an Excel file, you can import by worksheet or by named range.
          Note  You can import data from only one worksheet or named range per layout.

          Day 07 - Recurring Import in FileMaker - MightyData VIDEO


          • 2. Re: Recurring import script

                 Thanks, but the problem is that there´s a diffrent file every time...

                 Maybe I need a script that imports every file in the folder..

            • 3. Re: Recurring import script

                   Will each different file be the same in structure but just have a different file name? There should be tools that would allow you to automatically rename the file and put it in the folder for you.

                   It's also possible to create a script that imports every file found in a given directory provided they meet the criteria I just specified that they all have the same structure.

                   Option 1: Locate your folder inside the computer's documents folder. There's a get function that can list the contents of every file and folder inside documents so you can use that function to parse out the files listed inside one of its subdirectories. The advantage here is that you don't need a plug in to do this. The disadvantage is that you have to put the folder inside documents.

                   Opton 2: Acquire a plug in that lists the contents of a specified folder. This allows you to use a folder located anywhere accessible to your computer, but now you have to use a plug in--which can cost money and which can complicate maintenance and upgrades. (OS and FileMaker upgrades have been known to cause a plug in to "break".)

                   The same script can use a container field and export field contents to either delete, move or rename a file in order to keep from importing the same file twice.

              • 4. Re: Recurring import script

                     Thanks a lot! I will try Option 1!!!