Write, Bureaucrats, Administrators
4,332
edits
mNo edit summary |
mNo edit summary |
||
Line 219: | Line 219: | ||
</source> | </source> | ||
# Get the current library | # Get the current library and an array of its entries. | ||
# Check that the | # Check that the array is not empty of entries; otherwise stop the script, so we do not have a previous entry. | ||
# | # The array of entries is sorted from newest to oldest. The previous entry is set to the newest entry at the beginning of the array with an index value of 0. Get the Mileage field from the previous entry. | ||
# We set the value of the field Mileage from the previous entry as the default value for the field StartMileage. | # We set the value of the field Mileage from the previous entry as the default value for the field StartMileage. | ||