1 2 Previous Next 17 Replies Latest reply on Jul 10, 2015 12:14 PM by LarryGoldman

    WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

    LarryGoldman

      Title

      WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

      Your post

           Sometimes, it is useful to be able to import records internally from one FileMaker Pro table to another. In FileMaker Server 13, this works for FMP clients, but not for WebDirect clients: regardless of the settings on the Import Records step, WebDirect clients are always prompted to enter certain types of files (xls, etc.)

           To see for yourself, run my Test Import file.

           Do you see the problem? Is there a workaround?

      WebDirect_Import_Fail.jpg

        • 1. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
          philmodjunk

               That would seem logical that this doesn't work. Your Web Browser has no way to recognize and open a file of type .fmp12--unlike using FileMaker 13 to import the data.

               Does the fact that these are FileMaker files mean that the user also has a copy of FileMaker on their computer? If so, why use a web browser when you can bet a much nicer connection using FIleMaker Pro?

          • 2. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
            LarryGoldman

                 OK, so how does one accomplish a transfer of field data from one table to another within the server, if the client connects via WebDirect?

                 In FMP, Import Records, giving itself as the source file, works as expected.

                 One could script a bunch of Set Variable/Set Field script steps, but that is the function that Import Records performs at once.

                 The problem is FileMaker changed the functionality of the Import Records step in WebDirect, and provides no alternative that I am aware of.

            • 3. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

              Larry Goldman:

                   Thank you for the post.

                    

                   I am able to import a file of the type ".fmp12" via WebDirect. I tested by importing a file from my desktop into the FMServer_Sample.fmp12 by clicking File > Import Records > File…

                    

                   Does your user account and the file for import meet the requirements for importing a FileMaker file using WebDirect? 

                    

                   From page 19 of the FileMaker 13 WebDirect Guide:

                    

                   "Note To import from a FileMaker Pro file, web users must have access to an account in the file with the FileMaker WebDirect extended privilege enabled."

                    

                   Open the file to be imported with FileMaker Pro. Click File > Sharing > Configure for FileMaker WebDirect... and check to make sure the file has WebDirect access enabled. (See screenshot below).

                    

                   Please let me know if any of the above requires additional clarification. 

                    

                   TSFalcon

                   FileMaker, Inc.

                    
              • 4. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                LarryGoldman

                     TSFalcon:

                     Thank you for your reply.

                     Problem 1: The text in WebDirect's Import dialog is misleading at best, because .fmp12 file type is not in the list of accepted file types:

                     

                Please choose a file to import. Supported file types include tab, csv, dbf, mer, xls, and xlsx. Only single sheet xls and xlsx files can be imported.

                Problem 2: The .fp12 file to be imported must be pre-enabled for WebDirect access, even though it may never actually be served as a WebDirect file. "Gotcha."

                Problem 3: The original problem is unsolved: how do I script a transfer of field contents between tables _within_ a Filemaker solution, when accessed via WebDirect? Or, to put another way, how do I script the import from one WebDirect file to another, both hosted on the same (remote) server? As I mentioned, Import Records, works in all other contexts except for WebDirect. Something got broke.

                IMHO, what is needed is a new "Import Records From Within" script step which accomplishes this task.

                • 5. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

                  Larry Goldman:

                       Thank you for the reply.

                        

                       Problem 1 has been forwarded to our documentation department for review.

                        

                       Problem 2 is documented. WebDirect is the technology trying to access the file, so not having the privilege enabled to do so via WebDirect would be expected to stop file access.

                        

                       Problem 3 confuses me as I can see no advantage to importing from one hosted file to another. Why not establish an external data source from file A to file B and add the needed tables to the relationship graph as shadow tables? At that point, you have live access to the data in the other file and if for some reason moving the data to another table is required, this could be scripted using FileMaker Pro or FileMaker Server to handle the process.

                        

                       Please let me know if I misunderstand the goal. 

                        

                       TSFalcon

                       FileMaker, Inc.

                  • 6. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                    LarryGoldman

                         TSFalcon:

                         You said:

                         

                    >> At that point, you have live access to the data in the other file and if for some reason moving the data to another table is required, this could be scripted using FileMaker Pro or FileMaker Server to handle the process. <<

                    It is exactly the scripting part using FileMaker Server where the problem lies. As far as I can tell, scripted moving data to another table as you describe is impossible to accomplish for WebDirect users. 

                    My use case is: "Protoypes" is a table of boiler-plate records from which a new set of Working records is derived. I want move selected fields from every Prototype record into a corresponding new Working record, en masse. Import Records works for FMP clients. Please provide a sample script for WebDirect clients.

                    Thanks.

                    • 7. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

                      Larry Goldman:

                           Thank you for the reply.

                            

                           The script step "Perform Script on Server" is WebDirect compatible. 

                            

                           The screenshot below contains a script that exports a .xlsx from a file hosted by FileMaker Server 13 called "Exporter.fmp12" and imports into "Importer.fmp12" (hosted file on the same server) based on a primary key match field and adds new records. The Importer.fmp12 file is a related data source of the Exporter.fmp12 file.

                            

                      General information about the Perform Script On Server script step

                            

                      Feature comparison for FileMaker Pro and FileMaker WebDirect

                            

                           "Importing data from External Data Sources" is currently not a supported feature of WebDirect.

                            

                           If you would like to see a change in this behavior, I would encourage you to enter this as a suggestion into our Feature Requests web form at:

                            

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

                            

                           TSFalcon

                           FileMaker, Inc.

                      • 8. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                        LarryGoldman

                             TSFalcon,

                             The test file I linked in my original post on this thread contains a script "Perform Script On Server" which attempts to use the approach you suggest, but I could not find a way to make it work to transfer fields among tables in a FMS-hosted file. Can you?

                             Thanks. 

                        • 9. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

                          Larry Goldman:

                               Thank you for the reply.

                                

                               I have reviewed the test file provided. The reasons the file does not work follow:

                                

                               1. FileMaker Server can only Import/Export to "the Documents folder, the temporary folder, or a child folder of either the documents folder or the temporary folder."

                                

                          Import/Export Script on FileMaker Server

                                

                               2. Using FileMaker Server "Export to .fmp12 is not supported."

                                

                          Export Records

                                

                               3. Additionally, contained in the link above "when using this script step in FileMaker WebDirect, keep the following in mind:

                                

                               FileMaker WebDirect does not support exporting to .fmp12, XML, or Excel formats.

                                

                               If the Specify output file option is selected, FileMaker WebDirect outputs exported records with the specified filename and file type but ignores the specified file path."

                                

                               4. Use of Get ( FilePath ) instead of Get ( DocumentsPath ) or Get ( TemporaryPath ) means the location for import/export is not one FileMaker Server can access. 

                                

                               5. Importing from File A into File A serves no purpose as the data is already contained in the same file.

                                

                               The example I provided above however does work. 

                                

                               TSFalcon

                               FileMaker, Inc.

                          • 10. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                            philmodjunk
                                 

                                      5. Importing from File A into File A serves no purpose as the data is already contained in the same file.

                                  

                                 Not quite. You might be importing data from Table1 in File A into Table2 in File A.

                            • 11. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

                              PhilModJunk:

                                   Thank you for the reply.

                                    

                                   If a need to import data from Table1 in File A into Table2 in File A exists, then this can be scripted with FileMaker Pro or using a script run server-side. 

                                    

                                   However, unless the developer is attempting to flatten the file, then a relationship, using related fields or a portal on the layout, could achieve the same result.

                                    

                                   Additionally, to help guide others reading this thread with the relational design aspects of FileMaker, I am including some helpful knowledge base articles below:

                                    

                              Relational Database Design 101 (part 1 of 3): Designing a Flat File Database

                                    

                              Relational Database Design 101 (part 2 of 3)

                                    

                              Relational Database Design 101 (part 3 of 3)

                                    

                                   TSFalcon

                                   FileMaker, Inc.

                              • 12. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                                philmodjunk
                                     

                                          or using a script run server-side.

                                     FIleMaker to FileMaker imports/exports are not compatible with server side scripts. You have to export the data as a data file to the documents folder, then import the data file from the documents folder--just as though the tables were in two different files and taking twice as long as a straight forward fileMaker to FileMaker import.

                                     And while doing the import from a FileMaker Client works, it's beside the point. The user selecting the records to import in this fashion is presumably using their web browser and thus being able to use a FileMaker Client doesn't work for them as they don't have FileMaker Pro to use as that client.

                                     

                                          However, unless the developer is attempting to flatten the file, then a relationship, using related fields or a portal on the layout, could achieve the same result.

                                     That is also not the case. Importing the data may simply be step one in a process that uses the imported data as a template that is additionally modified--producing brand new records and anything but a flat file. Yes, there are work around for such tasks--such as using a looked up value auto-enter setting and a looping script, but when dealing with a large block of records and a large number of fields in each record, an Import Records action is much simpler to set up--if it only worked in this case.

                                • 13. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?
                                  LarryGoldman

                                       TFalcon said:

                                       

                                  Import/Export Script on FileMaker Server

                                       

                                             

                                       

                                            2. Using FileMaker Server "Export to .fmp12 is not supported."

                                       Well, my sample program works fine for FMP clients, even if the file is hosted on FileMaker Server. The problem is that there is no way to accomplish the "Internal Import Records" task via WebDirect.

                                        

                                       

                                            5. Importing from File A into File A serves no purpose as the data is already contained in the same file.

                                       PhilModJunk:

                                       

                                            Not quite. You might be importing data from Table1 in File A into Table2 in File A.

                                       Importing from Table1 in File A into Table2 of File A is exactly the problem I am trying to solve for WebDirect clients.

                                        

                                       TSFalcon:

                                        

                                       

                                            If a need to import data from Table1 in File A into Table2 in File A exists, then this can be scripted with FileMaker Pro or using a script run server-side. 

                                       Please provide an example of such a server-side script. You can use my test file as a basis.

                                        

                                        

                                  • 14. Re: WebDirect Clients Cannot Import FileMaker Pro Records From/To Itself?

                                    Larry Goldman:

                                         Thank you for the reply.

                                          

                                         "Please provide an example of such a server-side script."

                                          

                                         Attached below is repost of the script provided above. 

                                          

                                         The script works with 2 tables in a single file or 2 tables in different files hosted by FileMaker Server 13. 

                                          

                                         A "Perform Script on Server" button on a WebDirect layout running this script moves the records from Table1 to Table2 and updates based on matching. 

                                          

                                         TSFalcon

                                         FileMaker, Inc.

                                    1 2 Previous Next