Thank you for your post!
You'd most likely want to script this in some way. It might look something like:
If [ IsEmpty(TodaysMileage)]
Set Variable [ $mileage ; LastEndingMileage]
Set Field [TodaysMileage ; $mileage]
Perhaps triggered on Layout enter. This is just an idea -I'm sure developers will have stronger advice.
I'm also going to move this thread from the FileMaker Community Feedback Space (which is specifically for input on the Community itself) to the Discussions Space where you should receive more views and potentially that feedback from developers on this!
If I understand correctly, these are the key points:
a) you have more than one vehicle, (a "unit" in your terms) for which you are recording this info and each vehicle is identified by a unit number.
b) You want "todays end mileage" in the previous record for this vehicle to be entered as "Last Ending mileage" of the new record for that vehicle that you are now adding to the table.
Set up a self join relationship between this layout's table and another occurrence of the same table. Use the unit number field as the match field on both sides of the relationship. This matches any given record on your layout to all records in the same table for the same vehicle. Double click the relationship line to open a dialog where you can specify a sorted relationship and click the sort option for the new table occurrence that you've just added. You'll need to sort your records in descending order on a field that either: Auto-enters the creation date, Auto-enters the creation time stamp or that auto-enters a serial number. Sorting any such field makes the most recent previous record for this vehicle the first related record. You can then set up an auto-enter calculation on the Last Ending Mileage field to auto-enter the value of Todays End Mileage from this related record.
Thank you ........ issue resolved