Setting Colors with Date Function Expressions

You can customize the template to manage how your Status Board warnings are displayed based on the time elapsed or time remaining. For instance, if a volunteer or employee forgets to check back into an incident via the Incident Management account, or if equipment needs checking every 10 hours but hasn’t been monitored in a day. This feature will automatically change a row to Warning or Danger color without requiring user action. You can use item date function expressions to set the row color based on the date and time entered in a field.

🔑 ACCESS LEVEL REQUIRED: Account Owner

ℹ️ NOTE: You must set colors with status expressions within the admin area on web application. 

Expressions Available

  • isToday - is the date same date as todays date? Gives true / false
  • isTomorrow - is the date same date as tomorrow? Gives true/false
  • hoursSince - how many hours since this date/time happened (negative => date is in the future). Gives a number. Needs to be compared against a limit number.
  • daysSince - how many days since this date/time happened (same thing with negative). Gives a number. Needs to be compared against a limit number.
  • minutesSince - how many minutes since this date/time happened (same thing with negative). Gives a number. Needs to be compared against a limit number.

⚠️ ATTENTION: If you do not already have a date and time field, you will need to add one first.

  1. Go to the Admin Area
  2. Expand Templates
  3. Select Status Boards
  4. Click the Edit icon on the Status Board you wish to edit
  5. Select the ⋮ more options menu at the top right of the field and take note of the field ID, in the example below it is last_checked_Bd8H2gRx

  1. Scroll down and select +Advanced Options
  2. Enter in the applicable Item Status Expressions based on the desired colors including the time frame requirements

Examples for Using this Expression

An organization may create Status Boards to monitor generator checks every 4 hours during an incident to ensure they are functioning properly, or to track the most recent inspection of road damages.

This approach enables the organization to visualize Success, Warning, and Danger colors that appear when a generator misses its check-in requirement or road damage updates are overdue. Additionally, the organization can include a status option selection field to indicate whether the generator was found Operational or Not Operational during the check, or whether the road damage status is still Closed or Open.

Success (Green)

  • hoursSince: If status is operational, and it has been check in the last 4 hours, show green. Enter in the following: status === 'op' && (last_checked_Bd8H2gRx | hoursSince) < 4
  • minutesSince: If status is operational, and it has been check in the last 10 minutes, show green. Enter in the following: status === 'open' && (last_checked_Bd8H2gRx | minutesSince) < 10

Warning (Amber)

  • hoursSince: If status is operational, and has not been checked in the last 4 hours, show orange.  Enter in the following: status === 'op' && (last_checked_Bd8H2gRx | hoursSince) >= 4
  • minutesSince: If status is operational, and has not been checked in the last 10 minutes, show orange.  Enter in the following: status === 'open' && (last_checked_Bd8H2gRx| minutesSince) >= 10

Danger (Red)

  • hoursSince: If status is not operational, or it has not been checked in 24 hours, show red. Enter in the following: status === 'not_op' || (last_checked_Bd8H2gRx | hoursSince) >= 24
  • minutesSince: If status is operational, and has not been checked in the last 30 minutes, show red.  Enter in the following: status === 'closed' && (last_checked_Bd8H2gRx | minutesSince) >= 30

ℹ️ NOTE:  The following image is based on the Last Checked since it's 14:58 and the Status field.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us