September 15, 200817 yr Is it possible to calculate with a condition on a relate field? Lets says table B is a product table which has a category field, a price field and a foreign key to a record in table A. The category can be X, Y, Z. Each product has a pr Table A is let say a bill table (I know that's not the way it should be, it's only an example). Is it possible in table A to create a sum field of the price all the products which belong to category Z? In SQL, it would look like SELECT Sum(tableB.Price) FROM tableA INNER JOIN tableB ON tableA.pk = tableB.fk WHERE tableB.categoryID = 'Z'
September 15, 200817 yr If you create a global text field and then create a new relationship to another table occurence of TableB, you can join on tableA::pk = table::fk AND tableA::gCategoryID = tableB::categoryID. Now all you have to do is set the gCategoryID global field with "Z", "Y", whatever and you can now get the total. If this is not for browse mode and you want to just display it in a report, then you can use a summary report which has been contrained to "Z"
September 16, 200817 yr Author That solution seems good. I'm not very aware of all the "not too" relational db trick in Filemaker.
Create an account or sign in to comment