4 Replies Latest reply on Feb 5, 2013 8:51 AM by jfalberg

    multitasking scripts

    jfalberg

      Title

      multitasking scripts

      Post

           Presently in our application I am importing into all tables before I can further display my results in tabbed and sub-tabbed section.  What I would like to do is when the first import table containing the main records is done, have it so that the user can at least see the initial list of results and concurrently have a script behind the scenes import into other related tables and auto-refresh once they're done.  Is there any method how I can do that in such a way that can satisfy my demanding boss whom is not accepting the slowness it takes to accomplish certain things?

        • 1. Re: multitasking scripts
          philmodjunk

               Why do you need to import into tables like this in the first place?

               I don't think there is any way to get the data import to take place "in the background". You'll get a prorgress bar popping up every time. But you can import records, go to a layout perform a find, sort records or whatever so that data on that layout is visible before freezing the window and kicking off the next import, but that won't produce a situation where you can interact with the layout while records are being imported.

               Knowing why you are importing so much data on what appears to be a very frequent basis may suggest alternative approaches.

               Also, certain aspects to your table designs can greatly affect the speed at which records are imported. Each stored calculation field has to evaluate during import. If auto-enter operations are enabled, each auto-entered calcualtion has to evaluate. Indexed fields have a perormance penalty as they require FileMaker to build and update their indexes with each new record imported. So if you can review the settings on your fields and change calculation fields to unstored (or even remove them from the table) and turn off indexing on data fields that do not need to be indexed, this can make a significant difference in how fast the records import.

          • 2. Re: multitasking scripts
            jfalberg

                 Let me see if I can describe this in a better way.  Our application does search queries on an external web service which requires us to do an xml export and once we get information back we receive multiple return files in xml import format as well.  The concern is more in dealing with the timeliness of all the files we get back in return from the web service application.  Instead of waiting like up to 2 to 3 minutes for all the files to return and proceed with an all-in-one shot to load everything, we were looking at at least loading the first file of information which at least gets us an index page and then have the ability to get the rest of the information as it comes in.  I know this can be done behind the scenes in a web application environment at least and that is what my boss thinks can be done in filemaker as well.

            • 3. Re: multitasking scripts
              philmodjunk

                   If you set up a folder for receiving the downloaded files, FileMaker can check the list of files and initiate an import as each new file appears in the portal. There are several ways that fileMaker can acquire the list of files located in a specified folder. It can do this with a native script if the folder is located inside the documents folder. It can acquire this same list from other locations if you use one of the several plug ins that offer this added ability.

                   But I'm not sure how FileMaker could determine that the file has fully downloaded before attempting to import the data...

              • 4. Re: multitasking scripts
                jfalberg

                     For notification purposes I will probably setup a trigger script on certain events.  I'll post a somewhat related question as a new topic now.