Example: Add a Calculated Field

You have two custom fields on your Company Cars page called Beginning Mileage and Ending Mileage. You want to add a calculated field called Total Mileage that will show the total number of miles the car was driven.

  1. Select Setup > System > Design Custom Details.
  2. Enter a Field Title of Total Mileage.
  3. Enter a Database Field name of TOTALMIL.
  4. Select Calculated as the data type.
  5. Click Apply to save the field.
  6. Click the Expression Builder button.

    1. In the From Table drop-down list, select Tkpe.
    2. In the Fields list, scroll down and double-click the Ending Mileage field, u_endmile.
    3. In the Math drop-down list, select the minus sign (-).
    4. In the Fields list, double-click the Beginning Mileage field, u_begmile.
    5. Click OK to close the Expression Builder.
  7. Your completed expression appears on the Field Information dialog box: Tkpe.u-endmile - Tkpe.u-begmile
  8. Click OK.