Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Noob Help with calculation

Featured Replies

  • 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

  • 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 :-)

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.

  • 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

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.