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.

last record script

Featured Replies

  • Newbies

I tend to apply this script in an inventory db I'm working on but for discussion sake, say I have a db of 5 automobiles, all accords but different cars, unique Licence.

1. Honda, Accord, Licence, Date,Odometer,Fuel purchased

2. Honda, Accord, Licence, Date,Odometer,Fuel purchased

3. Honda, Accord, Licence, Date,Odometer,Fuel purchased

4. Honda, Accord, Licence, Date,Odometer,Fuel purchased

5. Honda, Accord, Licence, Date,Odometer,Fuel purchased

The original record for each car was created when the car was purchased and

a new record is created every time gas is put in the car.

So now the bd contains, say 200 records. I am trying to come up with a script that will pull out the most recent occurrence (Date) for each car and display this in a Table. This new Table should only contain 5 records.

Thanks for any suggestions on how to go about this, I'm stumped!

Ron

All i can think of right now...

Is that you would need a script to sort your table by most recent date

then loop to find the CAR #1; put that data in a temp table (add new record)

continue your loop searching for CAR #2 etc...

At the end display the temp table and you will have your 5 cars.

Finally delete all temp records in your temp table to be ready for

the next time.

Another way would be a related table based on plate# that stores all fuel

purchases, that way you could show (in a portal) all fuel transactions for

a given car.

HTH

Dan

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.