Newbies Jason Crews Posted June 13, 2005 Newbies Posted June 13, 2005 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
Newbies Jason Crews Posted June 13, 2005 Author Newbies Posted June 13, 2005 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 :-)
-Queue- Posted June 13, 2005 Posted June 13, 2005 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.
Newbies Jason Crews Posted June 13, 2005 Author Newbies Posted June 13, 2005 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.
Recommended Posts
This topic is 7171 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now