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 mode, 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 first 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.

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

To do this:

  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 Kabob 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

Example for Using this Expression

An organization may create status boards to help track the checks of generators on a 4 hour bases during an incident to ensure good operating order.

The organization's desire is to visualize the Success, Warning and Danger colors indicated when a generator is past its' check in requirement. Additionally, this organization has also created a status option selection field to indicate if during the check the generator was found Operational or Not Operational.

Success (Green)

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

Warning (Amber)

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

Danger (Red)

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

ℹī¸ 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