9 Replies Latest reply on Jun 19, 2017 7:45 PM by GaoshengHuang

    Calculations Involving Multiple Files

    GaoshengHuang

      Hi Filemaker Geeks! I am working on a project and planning to use one file for each table. Then I put all the logic and layouts in one file. But some calculation fields involve several tables, i.e., several files. What is the best practice for this? I understand that I cannot put these fields in the logic file. So that means the only option is to still build some relationships in the data files. Any other ideas or suggestions? Thanks in advance!

        • 1. Re: Calculations Involving Multiple Files
          philmodjunk

          Why put each table in it's own file?  That seems unnecessary.

           

          But you can put occurrences of tables from one file into the relationships graph of a another file, so the fact that you have one table to a file--the only way possible for FileMaker versions 3 through 6--does not make it impossible to link tables in relationships and the result is very close to what you would get with all tables in the same file.

          1 of 1 people found this helpful
          • 2. Re: Calculations Involving Multiple Files
            beverly

            Must they be Calculations? Can some of them be scripted Set Field? If all the tables/files are on the RG, they can be used in a "calculated" Set Field.

             

            Sent from miPhone

            1 of 1 people found this helpful
            • 3. Re: Calculations Involving Multiple Files
              Stephen Huston

              I also question the pre-7 idea of single-table files. Depending on your FM hosting plan, this can hugely increase your connection requirements for server connections. Even the Separation Model can double requirements, though at least there is some obvious reason for that model.

              1 of 1 people found this helpful
              • 4. Re: Calculations Involving Multiple Files
                beverly

                There are many threads on this forum that discuss TSM (separation) and valid reasons to maintain one-table-files. These threads list both the pros and cons. Rather than focusing on the "Why" OP has this, point to threads with those discussions.

                 

                Sent from miPhone

                1 of 1 people found this helpful
                • 5. Re: Calculations Involving Multiple Files
                  bertrand

                  I'll better prefer one-file-tables than one-table-files.

                  1 of 1 people found this helpful
                  • 6. Re: Calculations Involving Multiple Files
                    beverly

                    Oh me too. I do have one solution that is 4 files (one is interface, the others have many tables). It has to do with size of data and what needs to backup hourly and what needs to backup only weekly. There are reasons to use one-table-one-file. This post is about the calculations using the all like that.

                     

                    So state why one file/many tables is preferred to you.

                     

                    Sent from miPhone

                    1 of 1 people found this helpful
                    • 7. Re: Calculations Involving Multiple Files
                      GaoshengHuang

                      Dear Beverly and everybody else,

                       

                      I appreciate all your replies! Why do I use multiple files? Two reasons: first, as a lot of of have stated, I have a large amount of data, and there will be a whole lot more ahead; second, the business is still evolving and the program is expected to be updated often. If I use one file, then whenever there is an update to the design, I have to download and update the data when replacing the old file --- I am a contractor and work at my own home, not on site. That would take a lot of time.

                       

                      Naturally, there should be some calculation fields that involve multiple tables. For example, the payment is calculated by pieces of clothes dyed, so involves the processes (work steps table), size, design and colors of the closes (garments table) and seniority of the workers(employee table).

                       

                      Thanks again!

                      • 8. Re: Calculations Involving Multiple Files
                        philmodjunk

                        Yet much of that does not require one table to a file. If you want to do that, that's your choice and every choice has its' trade offs, but you can also put all the tables in one file and use a second file for the interface--the scripts, value lists, layouts to present to the user. Then, much of the time, you can update the interface by replacing that file without having to do any data imports.

                         

                        As your system increases in complexity, there are very good reasons for splitting your solution up into additional modules--each module representing a different key "subsystem" of the whole, that can make it easier to update a subsystem without having to update the entire system at once. But again, I would not go to the extreme of one table to a file.

                         

                        But this is all a sideline to the original question, which wasn't very clear. If you still have that original question unanswered, then please restate that question in more detail. (I did point out that in my very first response, that you can add occurrences of any table from any file in your solution to a relationships graph and once done, much of what you would do in terms of calculations will work from the context of that file at least, just as though the tables were all in the same file.

                        1 of 1 people found this helpful
                        • 9. Re: Calculations Involving Multiple Files
                          GaoshengHuang

                          Phil, I think your response is a terrific solution: to put all data in one file and then use an interface file. You did answer my question and other responses are of great help too. Just curious: when the data file gets bigger and bigger, does it affect performance? Will it get slower and slower? Thanks again!