June 13, 200520 yr Newbies I just picked up FM7 Dev this weekend and have hit a wall of ignorance already. Im working on a simple fleet maint. database. I have all the fields and tables setup. Its very basic. There's a table for vehicles that gives a vehicle ID, along with make model and purchase date. The second table is for workorders for repairs made to vehicles listed in the vehicles table. The association is made by vehicle id to the workorder. I would like to have a seperate layout where i can enter the vehicle ID and it will return the sum $ ammount of all the workorders that have been entered for that vehicle id. Essentially i need a field that will execute the following statement on the workorders database: If Vehicle ID = 001, Get Workorder Total, Else Goto Next Workorder Running Total = Workorder Total + Running Total Output Running Total hope this makes since. Thanks for your help
June 13, 200520 yr Author Newbies Ok i think i need to use the Summary Function to acomplish what i want. I'll keep trying and hopefully someone will chime in soon :-)
June 13, 200520 yr You can create a calculation in your vehicle table of Sum(WorkOrders::amount), where WorkOrders is the relationship based on vehicle ID. You can also create a self-relationship (to WorkOrders from WorkOrders) based on vehicle ID and create a similar Sum calculation in the WorkOrders table.
June 13, 200520 yr Author Newbies Amazing It Worked! I guess i dont really grasp the full concept of relational databases yet LOL... Thanks Queue! P.S. I was able to come up with something similar using the Symmary function, but it required doing a find on the workorders for a Veh. ID and going to the last record before it would give an acurate total. Now i will have to figure out how to get a Sum for workorders on a specific vehicle during a specified date range.
Create an account or sign in to comment