4 Replies Latest reply on Nov 9, 2009 2:29 PM by philmodjunk

    Problems mapping fields



      Problems mapping fields


      I've just encountered a rather frustrating problem. I've created a database on my computer that will import and update records provided by an excel spreadsheet. As usual on the first import, I set-up a field mapping, and again as usual on the second and subsequent imports, this mapping remained as I had originally set it up. Test records were imported, updated, etc as they should. Great, now the testbase was working, time to move it to a server....


      But upon copying the database to a Filemaker server area, the mapping disappeared. OK, I said, maybe this is because I've moved it to another location, so I spent 30 minutes remapping the fields. Fine. But when I try to import another excel file the mapping has disapeared again! It's clearly something to do with the database now being located on the server.


      Can anyone help?



        • 1. Re: Problems mapping fields



          Thank you for your post.


          Yes, the field mapping import will remain for the session.  However, when the file is hosted, the default imports are now with the server; not the client.


          Instead, you may want to create a script with the correct field order.  Then, you can call the script at any time and the import order is restored.



          FileMaker, Inc. 

          • 2. Re: Problems mapping fields

            OK, tahts great thanks.  I guess that the script would need to run before the excel file would be imported? Do you know of an example that I could look at?


            With a little work I think that this could solve this problem, but.......


            The database I have also uses a 'unique' number for logging the entries. This needs to be reset each year of logging entries. So, the logical thing was to use a global field to hold this number, then press reset at the beginning of each year to put it back to zero. However, when on the server, because its now hosted, the global won't reset. Is there a way to reset a global on a hosted server?



            • 3. Re: Problems mapping fields

              You import with this script. 

              For global fields, as I remember, was some restrictions in calculations, Take a look on Help or documentation.

              If you use The Global as auto enter, reset auto enter Next serial too.

              • 4. Re: Problems mapping fields

                I found a way to reset global fields on the server without having to take them down and open them with FMP:


                Write a script that sets the value for you as you want.

                Create a schedule in server that runs this script.

                Use the "run schedule now" option to run the script.


                Since FMS scheduler runs this script from a "host" context, the changes to any global fields will "stick".