1 2 Previous Next 26 Replies Latest reply on Dec 2, 2009 12:09 PM by jsutherlin

    FMS 10 Scheduled Script cannot handle External File References

    philmodjunk

      Summary

      FMS 10 Scheduled Script cannot handle External File References

      Description of the issue

      Server System:Winserver 2003 Standard Edition Sp 2, FMS 10 Client SystemWindows Xp, SP 3, FMP 10 adv According to some extensive testing on my part, scheduled scripts appear to be unable to use external data references to interact with Filemaker Files and tables external to the file whose script is being executed. I reached this conclusion after carefully performing the script manually from a client machine, Running a schedule that performs the same script and then carefully examining the Server Log and the data in the related external files. Exhibit 1 Set Field [RelatedLocalTable::NumbField, Expression]Set Field [RelatedExternalTable::NumbField, LocalTable::NumbField] I deliberately cleared the two field contents, and ran the script manually.The two fields each received the same number as expected. When I clear both fields, and run the schedule, RelatedExternalTable::NumbField is blank and I find "Scripting Error (100) at "Filename: Script Name : Set Field" in the Log.According to the Help File, Error Code 100 means "File Missing". Additional notes to rule out some possibilities:Both External and Local tables are related to the same parent table via calculation fields that return "1" in all three tables.Matching records exist in all three tables.The same layout was current during both manually and scheduled runs of the script.The external file was open and running on the server during both script runs. Additional Error 100 codes appear in the log and appear to match up with Perform External Script calls.

        • 1. Re: FMS 10 Scheduled Script cannot handle External File References
          etripoli
            

          Sounds familiar:

           

          {FMSA9} Really weird problem with a scheduled script to replace field contents

           

           

          Now that you say that, I went back and double-checked my event.log files, and I found the same 'Scripting Error (100)' message, over and over again (FMSA9).  How do you have the file paths defined in the database?

          • 2. Re: FMS 10 Scheduled Script cannot handle External File References
            Vincent_L
               Another proof to how useless and a joke the server side processing is done in FMS 10, even though that's the second release of it and still useless !
            • 3. Re: FMS 10 Scheduled Script cannot handle External File References
              philmodjunk
                

              etripoli wrote:

              Now that you say that, I went back and double-checked my event.log files, and I found the same 'Scripting Error (100)' message, over and over again (FMSA9).  How do you have the file paths defined in the database?


              fmnet:/IP address/filename;

              file: filename


              • 4. Re: FMS 10 Scheduled Script cannot handle External File References
                etripoli
                  

                Oooo, I think I may be on to something.  I setup a new database called 'testing', with a single table, a single field, and a single record.  I also created a script, named 'testing', that has only 1 step - Exit Script [Result: 1].  I then uploaded the database to the same server, but in a different folder than the main database with the scheduled script. 

                 

                Next, I added 'Perform Script ["testing" from file:"testing"]' to the scheduled script, told the server to run it, and received the 'Scripting Error (100)'.  I then removed the 'testing' database, uploaded it to the same folder as the main database, and voila!  It worked.  Also, in the main database, the file path is defined as 'File path: file:testing'

                • 5. Re: FMS 10 Scheduled Script cannot handle External File References
                  philmodjunk
                    

                  Thanks!

                   

                  That's very likely the issue! I've grouped my files into two different subfolders as part of my testing of scheduled backups. The files in question ARE in separate sub folders. I'll move some files around, test again, and report back.

                  • 6. Re: FMS 10 Scheduled Script cannot handle External File References
                    philmodjunk
                      

                    Still an incomplete solution.

                     

                    Moving all files into the same subfolder on the server DID change the behaviour of the script. This may be the solution for some. You may also be able to update your external file references to refer specifically to the subfolder in question in order for this to work.

                     

                    This doesn't quite do it for me.

                     

                    The Set Field[RelatedExternaltable.... steps now appear to work correctly.

                     

                    My perform script[ExternalScript.... triggers a script that uses Import Records to import records from the original file. The perform script script step now performs without error, but I get a File missing error code 100 when the external script attempts to import the records.

                     

                    I've checked my file reference in the Import Records Script step as these references are NOT part of the External File Refs listed under Manage:

                     

                    fmnet:/192.168.254.9/filename

                    file:filename

                    • 7. Re: FMS 10 Scheduled Script cannot handle External File References
                      etripoli
                        

                      I agree, there is a problem with FileMaker's implementation.  The solution doesn't work for me either, because of multiple servers, and the need to keep large numbers of databases organized.

                       

                      I'm not able to test another idea I had, but I wonder about using '127.0.0.1' for the IP address in the fmnet reference, if the database being referenced is on the same server. Again, not a final solution, but perhaps a temporary workaround for a single-server script.

                       

                      Also, it seems weird that the server would even care what folder the databases are in, since it seems to be connecting via IP ( the scheduled script shows up as a client in the Admin console ).

                       

                      I think we're at the point were the FM people need to take a close look at this issue.

                      • 8. Re: FMS 10 Scheduled Script cannot handle External File References
                        TSGal

                        PhilModJunk and etripoli:

                         

                        I agree that we need to take a closer look at this issue.  I have forwarded this entire thread to our Development and Software Quality Assurance (Testing) departments for review.  When I receive a reply or explanation, I will let you know.

                         

                        TSGal

                        FileMaker, Inc. 

                        • 9. Re: FMS 10 Scheduled Script cannot handle External File References
                          philmodjunk
                            

                          I just got off the phone with Filemaker Tech support and that issue may affect my previously reported results. I'm going to do more testing and report back to here what I find.

                           

                          OK, now that I've done more testing, I stand by my earlier post.

                           

                          I'd done a little "fast and loose" directory restructuring that wasn't 100% by the book. I removed and uploaded my files to a common directory, then repeated my last test run of the scheduled just to make sure that I hadn't created any issues. I hadn't.

                          • 10. Re: FMS 10 Scheduled Script cannot handle External File References
                            etripoli
                              

                             

                            Success!  In the Manage External Data Sources window, for the database I was trying to connect to, I inserted the name of the folder in the file path, and the Replace Field contents now works in Scheduled scripts.  Just to be clear, the first example below won't work if the databases are in different folders:

                             

                             

                            File Path: file: Database Name

                             

                            But, if I include the directory that the database is in, it works:

                             

                             

                            File Path: file: Directory/Database Name

                             

                             

                            I don't know if that is by design, or if it can be used to properly access databases on separate FileMaker servers, but further testing will at least answer the second question.

                             

                             

                             

                            UPDATE: Further testing has shown that it still isn't possible to access data or scripts in a database on another server.  So there are still some issues with FMS that need to be resolved by FM.
                            • 11. Re: FMS 10 Scheduled Script cannot handle External File References
                              TSGal

                              All:

                               

                              Just to confirm, here is a reply from Development.

                               

                              "We do not support External File Referencing using the fmnet protocol.  In this example, it seems like they are using the fmnet protocol to reference their files and so this is expected behaviour."

                               

                              There is no mention why this isn't supported, nor that this is being considered, so I would recommend each of you to enter this into our feature request web form at:

                               

                              http://www.filemaker.com/company/feature_request.html

                               

                              I know I could easily copy your posts and paste them into the form, but there are additional questions asked that only each of you can answer.

                               

                              I have noticed that certain suggestions get more attention when there are real life examples involved.  That is, please just don't say "Add this suggestion".  Explain what you are trying to do, what barrier you are running into, and how changing this would help you, your business, efficiency, etc.

                               

                              TSGal

                              FileMaker, Inc.

                              • 12. Re: FMS 10 Scheduled Script cannot handle External File References
                                Vincent_L
                                  

                                Thanks TGGal for the clarifiction.

                                 

                                But what about imports from .fp7 files hosted by the same server. I know it doesn't work, and that's a HUGE drawback. 

                                 

                                So let's say I've a server naes "FMPserver" that host 2 files A.fp7 and B.fp7

                                 

                                what I need is server side scripted import from B to A, like I can do on the client.

                                I've seen no documentation telling that it does not work on server side scripting, but in fact it doesn't 

                                 

                                Thanks.

                                 

                                P.S : 50% of my 20 import export script relies on this, and I can't eliminate muy robot because of this. 

                                I know the workaround : a set field loop is slow as hell, exporting file from b then importing them in A is stupid because it takes times, while the major point of server side processing is to get effecient. Not to mention that uit would need more development 

                                 

                                 

                                 

                                 

                                • 13. Re: FMS 10 Scheduled Script cannot handle External File References
                                  philmodjunk
                                    

                                  "We do not support External File Referencing using the fmnet protocol.  In this example, it seems like they are using the fmnet protocol to reference their files and so this is expected behaviour."

                                   

                                  Say what?

                                   

                                  Is this in the context of server side scripting only?

                                   

                                  From client side scripts, external file referencing via fmnet is both expected and recommended for files hosted by FM Server. Do it all the time and it works without trouble. It will work on the server side for some things but not others. The Import Records script is the major glitch here.

                                   

                                  Or am I misunderstanding something?

                                  • 14. Re: FMS 10 Scheduled Script cannot handle External File References
                                    etripoli
                                      

                                    @TSGal - Thanks, at least I won't try to take any more time to try to make it work through fmnet.  I am going to try a shared, mounted locally database, to see if I can get multiple servers to share data.  I have submitted a feature request.

                                     

                                    @Glitchtracker -  are all the databases in the same folder?  That was my hang-up.  Also, the fact that if the database in one folder within the database root folder, needed to access a database in different folder on the same server.  In that case the file path needs to be modified:

                                     

                                    If:

                                     

                                    /folder1/database1

                                     

                                    needs to run scripts in, or get data from:

                                     

                                    /folder2/database2

                                     

                                    then, in the External Data Sources definitions for database1, define the File Path to the other database as:

                                     

                                    file:../folder2/database2

                                     

                                    Looks funky, but it works.

                                    1 2 Previous Next