8 Replies Latest reply on May 7, 2015 1:37 PM by philmodjunk

    Calculations Between Portal Rows


      Calculations Between Portal Rows


      Hi all,

      I am just wondering if it is possible to perform calculations between portal rows? Example is doing a basic flight planning database. Table one would be waypoints, table two would be flight plans and table three would be waypoints used. 

      I would imagine you would do a layout with the flight plan and a portal to waypoints used. This would do a lookup from waypoints to get your data. This part is straight forward. 

      What I want to know is with the list of added waypoints in the portal, you want to do calculations between them within the portal for example. Fuel burn. It would start with the first entry which would come from the flightplans table; example 80L. The next line in the portal row would be a calculation like:

      Value in portal row above - (time enroute*fuel burn)

      And this would then go for each waypoint down the portal row till the end which would tell you how much fuel would be left?

      Does this make sense?



        • 1. Re: Calculations Between Portal Rows

          The GetNthRecord function can be used to access data in the previous record.

          Let ( R = Get ( RecordNumber ) ; If ( R > 1 ; GetNthRecord ( FieldFromPrecedingRecordHere ; R - 1 ) ) )

          • 2. Re: Calculations Between Portal Rows

            How do you know the fuel burn between waypoints? Where does that number come from?  For example:

            If I go from A to B to C, and I know from A to B is 80L, and B to C is 60L, that's 140L.  But if I go from A to C, is that also 140L? Is A to B the same as B to A?

            What if I go from A to C to B?  I would think 'time enroute' is a number based on distance from where you start.  Are all the waypoints pre-calculated or do you search them as you make up an itinerary?

            You can do the calculations in the portal row if you manually enter the burn rates, or have them auto entered.    I would think instead of a portal, the itinerary may be better as a pop up list view

            • 3. Re: Calculations Between Portal Rows

              Hi Guys,

              PhilModJunk that is the idea I was looking for. I just couldn't see how it was going to work. Thanks Heaps.


              Steve you are right. For simplicity I didn't put in the rest of the equations. You choose the waypoints and insert them, you then calculate the time between each one and the fuel burn. If you change the order, you have to recalculate. The burn rate is dictated by the type of aircraft and this would be a separate table again. 

              A popup might be the way to go, but I haven't played with them yet. 


              Cheers and many thanks


              • 4. Re: Calculations Between Portal Rows

                I saw this problem before and suggested that each record should not represent a "waypoint" but a "leg" that starts at one point and ends at another as a way to make it easier to account for data specific to the airplane traveling from from one point to the other. For the other poster, these were airports instead of way points, but the problem seems very similar.

                • 5. Re: Calculations Between Portal Rows

                  Hi PhilModJunk,

                  You are correct from a point of view. We refer to Waypoints because not always are we flying from one airport to another. Each entry on the plan should be referred to as a leg as you correctly put it. However we refer to the way points as we enter them in as a list and the "legs" are essentially between them. 

                  Either way you are right and it is the same problem. I will keep posting here to update my progress.


                  Many thanks again

                  • 6. Re: Calculations Between Portal Rows

                    Yes, but there's a small but key difference in how you set up your data model. If one record represents one waypoint, the data, such as fuel consumption does not actually belong to either record as it represents a value that falls between records.

                    If each record is a Leg, with a starting way point and an ending waypoint, The distance, flight time, fuel consumption, etc all then belong in fields of that one record.

                    • 7. Re: Calculations Between Portal Rows

                      Exactly right. This occurred to me after I posted that and then tried to do the calculations. You are right and from a database point of view that makes sense. From a pilots point of view, each one of us takes the paper form we are used to and tries to simply put it in filemaker and runs into the same problem. It is good we are discussing this. I tried to follow on in the other thread, but didn't get very far.

                      Thanks for pointing this out as it shows as always correct database design in the beginning makes everything much easier later on.



                      • 8. Re: Calculations Between Portal Rows

                        You can set this up to work from "legs" but by displaying only the end waypoints, have it look to the user like way points.