Jump 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.

Featured Replies

I am trying to create a database that will help me keep track of the miles that i drive and fuel used as well as fuel efficiency. I have a field labeled 'Current Mileage' and another labeled 'Previous Mileage'. What I would like to have happen is: Each new record created, the 'previous mileage' would automatically populate with the number that was in the 'current mileage' field in the previous record.

Is this possible?

thanks

darron

It is possible, but maybe a better way is to do it by dates. This gives you more flexibility if later you want to calculate the mileage for say a given year.

But to do what you want to do, you make your layout with 1 entry needed, your current mileage. You also have the field PREVIOUS which pulls the mileage currently stored in your db. Then you can have a button that runs a script that makes the calculation for mileage and replaces the mileage with the CURRENT mileage.

I believe tho that using mileage by dates would be best tho. You just need to have 3 fields. DATE, MILEAGE, MPG.

MPG would be a calculated field based on the mileages selected by dates. You could do so much this way. Charts, graphs, comparisons, etc etc.

One way to do this is to put the current mileage into a global field before creating the new record, then set the previous mileage field with the value in the global field.

Set Field [gMileage, Current Mileage]

New Record/Request

Set Field [Previous Mileage, gMileage]

HTH, Mike

Mike ...

I'd add a couple of steps before yours:

Show all records

Sort (on Current Mileage, ascending)

Go to Record/Request [Last]

then your steps:

Set Field [gMileage, Current Mileage]

New Record/Request

Set Field [Previous Mileage, gMileage]

and finally

Go To Field ["Current Mileage"]

Jim,

Works for me. Hope it works for Darron. wink.gif

Mike

Create an account or sign in to comment

Important Information

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

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.