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.
- Select Setup > System > Design Custom Details.
- Enter a Field Title of Total Mileage.
- Enter a Database Field name of TOTALMIL.
- Select Calculated as the data type.
- Click to save the field.
-
Click the Expression Builder button.
- In the From Table drop-down list, select Tkpe.
- In the Fields list, scroll down and double-click the Ending Mileage field, u_endmile.
- In the Math drop-down list, select the minus sign (-).
- In the Fields list, double-click the Beginning Mileage field, u_begmile.
- Click to close the Expression Builder.
- Your completed expression appears on the Field Information dialog box: Tkpe.u-endmile - Tkpe.u-begmile
- Click .