Setting Colors with Date Function Expressions

Manage how your Status Board warnings are displayed based on time passed or time left. For example you may have a volunteer or employee that forgot check back into the incident via the Incident Management account. Another example is you have a piece of equipment that needs to be checked on every 10 hours, but no-one has had time to check it in the last day.

For these types of Status Boards, we have functions to automatically turn the row into Warning or Danger color, without any action from the user. Item date function expressions allow you to specify what color a row within a status board should be based on what is entered into a date and time field.

🔑 ACCESS LEVEL: 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 check_in_time
  6. Scroll down and select +Advanced Options
  7. 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' && (data_checked | 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' && (data_checked | 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' && (data_checked | 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' && (data_checked | 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' || (data_checked | 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' && (data_checked | 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