In this article, you can learn how you can calculate the most recent or latest date from a connected table.
Example Use Case
To access the most recent order date or the latest payment made by a tenant for rent, you can include a Max formula field to compute the most recent or latest date from a connected table.
Tables and Date
Before we go through the steps, you'll need to have at least two connected tables and a Date/Time field in the child table. For example, you may have Customers connected to Orders and the Date/Time field is in the Orders table.
Tip: For more information on how formula fields work, you can learn more from this article: About Formula Fields.
Steps
Calculate Most Recent Date
1. In the child table (in this example the Orders table), we'll add a new Equation field.
2. Next, we'll update the Equation settings as follows:
- Equation Type: Date
- Date Type: Seconds
- Result Type: Number
The Equation Editor should only include the date field:
This converts the date into a numeric value that can be used by a Max formula.
Note: Formulas can only work with numbers, not dates.
3. In the parent table (in this example the Customers table), we'll add a new Max formula field to track the most recent date.
4. Then, we'll set the "Field to max" to the equation field you created in the child table.
5. In the parent table (in this example the Customers table), add a new equation field. This field will convert the Most Recent Date field back to a date value.
- Equation Type: Date
- Date Type: Seconds
- Result Type: Date
- Equation: {Max} where "Max" is the formula field you used in the previous field's step.
That's it! Now, you will have a field that shows the most recent connected date.