AnsweredAssumed Answered

Calculations between portals

Question asked by JohhnyHilly on May 2, 2013
Latest reply on May 4, 2013 by JohhnyHilly

Title

Calculations between portals

Post

     PhilModJunk, I am directing this question in your direction as it is relating to the layouts and portal you help me set up from this thread http://forums.filemaker.com/posts/f0f8e6302b?page=4

     I am wanting to create a calculation field, that multiplies a sum value of a portal field, with a value from another portal. Now normally this would be easy to do, however, with the way I have it setup it is easier said than done.

     If you remember, I have a layout based on Equipment_List table with two portals in, called MDR Input. The first portal is linked to Equipment_List|SameVessel where the vessel equipment list is, and the second portal is linked to Service History. When you click on the piece of equipment it makes it the active record and I enter service data into the second portal relating to that equipment.

     In the second portal, I am summing the number of times a radio button is selected as "Yes". I have this field sitting outside the portal and is working fine. What I then need to do is to take this field and multiply it by a field in another portal relating to the same piece of equipment. This other portal is on a layout (called Vessel Equipment Specs) based on Vessels and the portal linked to Equipment_List. In this portal there is the vessel equipment list with info/data about each item on the list.

     This is how the relationships look:

     Vessels - - - - <Equipment_List> - - - - Service History

                                                | - - - - Equipment_List|SameVessel

     Vessels::__pkVesselID = Equipment_List::__pkEquipment_ListID

     Equipment_List::__pkEquipment_ListID = Service History::_fkEquipment_ListID

     Equipment_List::_fkVesselID = Equipment_List|SameVessel::_fkVesselID 

     So two main questions. The first, for a piece of equipment say Main Engine Port, how do I multiply the sum value of the radio buttons in the MDR Input layout with a field value in the portal on the Vessel Equipment Specs layout for the same piece of equipment?

     The second, is how do I then do the exact same thing for the next piece of equipment say Main Engine Starboard?

     I was able to do all of the above for the first piece of equipment, but then got stuck on the next, as I wasn't sure how to take the sum value for Main Engine Starboard and multiply it by the field value in the Vessel Equipment Specs layout  for Main Engine Starboard.

     Any help would be much appreciated. I know it's complex so let me know if any of it doesn't make sense. Thanks a lot.

Outcomes