7 Replies Latest reply on Jun 28, 2010 2:18 PM by RickWhitelaw

    How Do I Import Calculations?



      How Do I Import Calculations?


      I have quite a few field names to import into a new table. I want to import the associated calculations as well but cannot find how to do it. Is there a way, or do I have to manually enter in the calculations for each field? 


      I am running FM Pro 11


      The only option that seems mentioned anywhere is to upgrade to FM Pro 11 advanced.



        • 1. Re: How Do I Import Calculations?

          You can use import records with the New table option.


          This imports all the data and all the fields so you have some things to delete after the import, but it saves re-entering all your calculation fields by hand. It'll also wrap any calculations that don't work in the context of your new table in /* comment */ brackets so you'll want to review all your calculation fields after import and fix those that need to be fixed.

          • 2. Re: How Do I Import Calculations?



            I may be missing something, but when I tried the New Table import before, it puts my calculations in as records - not as the field type and calculation format for the field itself.

            • 3. Re: How Do I Import Calculations?

              It's not perfect and Filemaker Adv gives a lot nicer of option of copying and pasting fields--which also allows you to add a new set of fields to an existing table--but it does work.


              Let's say you have 20 calculation fields in table A that you want to put in Table B-- a new table not yet defined in your sysetm.


              Use import records to import table A, specifying a new table as the target of the import.


              You get all the records and all the fields from Table A--including the calculation 20 calculation fields you wanted.


              Now go to manage database and delete all the fields that you don't want and review the calculation fields that you do want for issues such as the /* */ that I mentioned earlier. Rename this new table "Table B". If you don't want the data that was imported, go to your new layout for this table and delete the records.

              • 4. Re: How Do I Import Calculations?

                Phil - It seems like your suggestion assumes I already have the calculations in the database. Again, I may be missing something. I took a look at Filemaker Pro Advanced and I can't see where that helps me either. 


                My issue is that I am creating fields that should be of type "calculation." It is much easier to define the calculations outside of filemaker because I can use find and replace to change key calculation variables for the 100+ calculations I need to perform. Only problem seems that I can't get those calculations back into filemaker associated with the proper fields. It looks like my option in Filemaker Pro/Advanced is to copy a similar calculation, manually open up the calculation in the database manager, change the variables, and then move on to the next field repeating the action. Not the most efficient means - unless again I am missing some key element here.


                Thanks for your help.



                • 5. Re: How Do I Import Calculations?

                  Yes, I assumed that you would be defining these fields in a table at the start.


                  Your only option, when working from a text file is to copy the calculation text to the clipboard and then paste the text in to a specify calculation dialog. That allows you to move the calculations into filemaker, but only one such calculation at a time.

                  • 6. Re: How Do I Import Calculations?

                    I am somewhat confused by your saying that you cannot import calculated fields. I just created a new table and imported a table with numerous calculated fields and they all were imported with  few problems.


                    The calculated would be "/commented out" if it were defective as pointed out above. You can see this in the field definition dialog.


                    Self-standing calculations such as creating a mailing label out of name, street, city, state, zip fields worked just fine.


                    Also,  using Advanced you can use advanced to copy and paste tables and fields from one file to another or within the same file from table to table. I use copy and paste in tables where I want to create "1 of 17 of 213", for instance.


                    • 7. Re: How Do I Import Calculations?

                      Phil is saying you can import calculation fields if they already exist in FM. In this case the OP wants to import calculations created elsewhere.