2 Replies Latest reply on Nov 11, 2015 6:34 AM by Ben_B94

    Adding Question


      If I make a script to add numbers in fields and if those fields belong to different tables, do the tables need to be connected via a relationship for the script to work?


      If the answer is no - I am using set field(table::totalcost) sum(table::cost1;table::cost2..etc)  and want to add fields from different tables in the calculation but it wont work.I've tried just adding in the name within the Sum function but still no

        • 1. Re: Adding Question


          Yes. The tables need to be related. Since FileMaker is relational, it works with the relationships. Without a relationship, FileMaker can't see the other table and wouldn't know which record from the unrelated table to pull from.


          ExecuteSQL is a function that allows you to reach into any table and grab some contents without a relationship. You could explore that idea. Its a bit more trouble but it will work.

          • 2. Re: Adding Question

            Thanks Jeremy