8 Replies Latest reply on Mar 9, 2017 4:29 PM by binu.alexander

    Import script error when hosted on FMS

    duaneweller

      Summary

      Import script error when hosted on FMS

      Product

      FileMaker Server

      Version

      11.0.4.404

      Operating system version

      Mac OS X 10.7.3

      Description of the issue

      When performing a scripted import on a hosted file a "No fields were selected for import" error is displayed when "matching" is chosen as the import order. Same script and file combination work fine when file is opened locally.

      Steps to reproduce the problem

      Create a new file. Import a CSV file. Create a script. Add "Import Records" script step. Check "Perform without dialog" and "Specify import order". Leave "Specify data source" unchecked. Set "Arrange by" to "matching names". CSV file should include the field names in the first record. Test the script. It should work fine locally. Now host the file with FMS on Mac OSX. Open the file with Open Remote. Run the script selecting your CSV file for import.

      Expected result

      The CSV file should import while the file is hosted.

      Actual result

      A "No fields were selected for import" error is displayed.

      Exact text of any error message(s) that appear

      "No fields were selected for import"

      Configuration information

      Client is FileMaker Pro Advanced 11.0v4 running on Mac OSX 10.7.3.

      Workaround

      1) Uncheck "Perform without dialog" and require the user to set the import order manually. 2) Set the import order to "last order" after importing using "matching names".

      Screen_Shot_2012-02-17_at_11.29.59_AM.png

        • 1. Re: Import script error when hosted on FMS
          user15307

          Duane Weller,

          Thank you for posting.  I apologize for the late reply.

          The details you provide are helpful, but I need additional information in order to reproduce the issue.  

          There may be a problem on the server-side with regard to the location of the file from which you plan to import.  When you have the file hosted on the server, where are the CSV files located?

          There is a helpful knowledge base article, answer #7035 that addresses this.  You can find it at this link:  http://help.filemaker.com/app/answers/detail/a_id/7035

          I realize it has been three weeks since you posted.  If you have found a resolution to this, please post it here so others may benefit.  Otherwise, please let me know of any other details you find that may prove helpful in identifying the cause of the error.

           

          TSTuatara

          FileMaker, Inc.

          • 2. Re: Import script error when hosted on FMS
            duaneweller

            TSTuatara,

            Thank you for looking into this and posting the link. I've read this tech artical as well as several others prior to posting. This article is not relevant to what we are trying to accomplish. This error is reproduciable I've had other developers confirm this using multiple systems and different file sets. I didn't seem to have a problem with it prior to 11.0v4, so it may be an issue introduced in the last update. In my recent testing I'm getting the error now locally as well as when the file is hosted.

            The location of the CSV file should not be a factor. In fact, that's the whole point of what we are trying to accomplish. The user is specifying the data source. They trigger a script with the Import Records script step. The Open File dialog is displayed and they select a file. The file might be on their local drive or on a network drive, as long as they have "read" access to the file, they can import it.

            I wish I could post an example file. However, to reproduce this you need to setup a FileMaker database with a table that has fields that match the CSV file you intend to import.

            1) Create a new database and import your CSV file creating a new table with the "Don't import first record" checked. The CSV file should have the field names in the first row. You could also do this by dragging your CSV file to the FileMaker icon in your Dock.

            2) Create a new script. Add the "Import Records" script step. Check "Perform without dialog".

            3) Check "Specify data source" and choose your CSV file. Click OK and set your first row options to "Field names". We do this to set the import field mapping.

            4) Click the "Specify..." button. Set the "Arrange by:" drop-down to "matching names". Check the "Don't import first record" checkbox and click OK.

            5) Uncheck the "Specify data source" so that the user can select the file from his hard drive. Save the script.

            The final settings should look like the attached image.

            Run the script to get the error. In the past the Import Records script step was able to recall the field mapping regardless of the "Specify data source" settings. For one reason or another the "matching names" setting fails under these condidtions. If I choose another "Arrange by:" option, such as "last order" the script performs as expected.

            Let me know if you need any further information.

            -Duane

            • 3. Re: Import script error when hosted on FMS
              user15307

              Duane Weller,

              I have been able to reproduce the issue. I have forwarded my findings along with your detailed post to Development and Testing for further review and confirmation.  I will keep you updated as information becomes available to me.

               

              Thank you,

              TSTuatara

              FileMaker, Inc.

              • 4. Re: Import script error when hosted on FMS
                nielscastle

                Same problem on FileMaker Server 15 - exactly as Duane described - workaround still working.

                 

                I can not believe that I just spent 4 hours on a Friday evening trying to solve a problem that was accurately reported as a bug more than FIVE years ago.

                 

                I'm not happy.

                Niels

                1 of 1 people found this helpful
                • 5. Re: Import script error when hosted on FMS
                  TSGal

                  nielscastle:

                   

                  I have attached your post to the original report and asked that it be reviewed.

                   

                  TSGal

                  FileMaker, Inc.

                  • 6. Re: Import script error when hosted on FMS
                    binu.alexander

                    Same Error ... with almost same situation as above reported ..

                     

                    Is there any permanent solution ?

                    • 7. Re: Import script error when hosted on FMS
                      TSGal

                      binu.alexander:

                       

                      There is no permanent solution at this time.  Until this is addressed, continue using the workaround of unchecking "Perform without dialog".

                       

                      TSGal

                      FileMaker, Inc.

                      1 of 1 people found this helpful