Skip to content

Time-Based Formula Fields Never Auto Update #1756

@dkindlund

Description

@dkindlund

Describe the bug
When creating a formula field in a table that uses a timestamp, it seems the formula value is only every computed once during the life of the record. For certain time-based formulas, it makes sense for the formula to be re-computed at a set frequency (e.g., every 5-15 minutes).

To Reproduce
Steps to reproduce the behavior:

  1. Create a table in a new base
  2. Create a timestamp field named Published At
  3. Create a sample record with a valid Published At value
  4. Create a new formula field named Age where the formula as:
TONOW({Published At}, "day") & " days ago"
  1. See that the Age field is accurate for now.
  2. Wait 2 days.
  3. Refresh the view.
  4. See that the Age field value was never recomputed -- it still shows a stale computation.
  5. The only way to force recomputation is to either: (a) adjust the Published At timestamp manually OR (b) adjust the Age formula manually.

Expected behavior
When creating a new formula, I would like Teable to offer an option to auto recompute the formula value on a set CRON schedule (e.g., every 5 minutes, every 15 minutes, ...). That would give the table designer maximum flexibility about how often these formulas recomputed. If that is too difficult to do on a field-by-field basis, then at least allow the designer to specify a table-wide recompute CRON schedule that could apply equally to all formulas within a table.

Client (please complete the following information):

  • OS: Linux
  • Browser: Chrome

Platform (Please tell us which deployment version you are using)
[docker-standalone]

Additional context
Teable is deployed as a Google Cloud Run service with autoscaling enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions