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

    Recurring import script

    noto

      Title

      Recurring import script

      Post

           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
          davidanders

          http://help.filemaker.com/app/answers/detail/a_id/7532/~/setting-up-recurring-imports-in-filemaker-pro
          How do I set up a recurring import in FileMaker Pro?
          Answer ID: 7532Last Updated: Sep 19, 2011

                

          http://www.filemaker.com/12help/html/import_export.17.15.html

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

               To set up recurring imports:
                                                                                                               
                                   
          1.
                              
                                   
                                        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.
                              
                                                                                                               
                                   
          2.
                              
                                   
                                        In Browse mode, choose File menu > Import Records > File.
                              
                                                                                                               
                                   
          3.
                              
                                   
                                        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.
                                                                                                               
                                   
          4.
                              
                                   
                                        Locate and select the file containing data you want to import.
                              
                                                                                                               
                                   
          5.
                              
                                   
                                        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.
                                                                                                               
                                   
          6.
                              
                                   
                                        To skip importing column headings, select Don’t import first record (Contains field names).
                              
                                                                                                               
                                   
          7.
                              
                                   
                                        Accept the default layout name or type a new name for the layout FileMaker Pro will create to display the imported data.
                              
                                                                                                               
                                   
          8.
                              
                                   
                                        Accept the default script name or type a new name for the script you can use to update data manually.
                              
                                                                                                               
                                   
          9.
                              
                                   
                                        Click OK.
                              
                                                                                                               
                                   
          10.
                              
                                   
                                        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.

          http://www.youtube.com/watch?v=zmYLh72di0A
          Day 07 - Recurring Import in FileMaker - MightyData VIDEO


                

          • 2. Re: Recurring import script
            noto

                 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
              philmodjunk

                   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
                noto

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