Forms, fields and formulas

Show an expiry status on a form with an IF formula

Add a computed text field with a nested IF that compares a date with today() and shows Expired, expiring soon, or Valid.

Tip

Short answer: Add a computed Text field with a nested IF that compares an expiry date with today(). The field then shows whether the item is expired, expiring soon, or still valid, with no manual checking.

When to use this

Use this for anything with an end date: memberships, licenses, contracts or certificates. For example, a membership renewal form can show:

  • Expired when the date is today or earlier
  • Less than ten days left when it's within the next ten days
  • Valid otherwise
IF(RenewalDate <= today(), "Expired", IF(RenewalDate < today() + 10, "Less than ten days left", "Valid"))

Set it up

  1. Add a Date field for the expiry date, for example Renewal Date.
  2. Add a Text field for the status and turn on Is this a computed field?
  3. Enter the formula with your own field ID, and save. See IF function and Date expressions.
  4. Preview the form with a past date, a date a few days away, and a date far ahead to check each result.

Tip

today() is based on UTC. You can also use the status field in step conditions, for example to route expired items to a renewal step.

Related answers