Specifying Status Expressions
Keep in mind the following guidelines for specifying status expressions:
Valid operators: AND, OR, NOT, <, >, <=, >=, =, !=, (, )
Valid operands: numbers, tags, true, and false (the true and false operands are not case-sensitive)
Specify strings between single quotes (')
Specify tags and functions between double quotes (")
If an expression is blank, it evaluates to false.
For lines, the expressions can relate to the assets of the line. For example, a line could be in Planned Downtime if either of the two assets in the line are in Planned Downtime. Copy the Planned Downtime expressions for each appropriate asset, and paste them into the Planned Downtime expression for the line.
The following functions are available for use in the status expressions:
HAS_ALERTS—This function evaluates to true if there are active alerts on the equipment.
ARE_ALL_CHILDREN_RUNNING—This function evaluates to true if all children of this piece of equipment are in the Running state.
IS_SCHEDULED—This function evaluates to true if the current time is within a shift.
IS_DATA_OK—This function evaluates to true if good quality data is detected on all additional properties defined on the Additional Properties page for this piece of equipment, and on all properties and tags used in status expression evaluation or KPI calculations.
When using one of these functions in an expression, if the function applies to the current piece of equipment, you do not need to specify the equipment’s Thing name in the expression. Functions specified with a Thing name are valid, and can be used to include functions against other equipment within an expression.
For example, if a line named Line1 includes assets named Pump1 and Pump2, then to include a check for alerts on either asset in the expression for the Warning state on Line1, enter an expression such as the following:
"IS_DATA_OK" AND ("HAS_ALERTS" AND "HAS_ALERTS:Asset_Pump1" AND "HAS_ALERTS:Asset_Pump2")
When lines and assets are initially created, their default status expressions are as follows:
Not ConfiguredNOT"<equipment_thing_name>:isConfigured"
Planned DowntimeNOT "IS_SCHEDULED" OR ("IS_DATA_OK" AND (false))
Warning"IS_DATA_OK" AND ("HAS_ALERTS")
Running
Assets—"IS_DATA_OK" AND (false)
Lines—"IS_DATA_OK" AND ("ARE_ALL_CHILDREN_RUNNING")
Unplanned Downtime"IS_DATA_OK" AND (false)
Unavailabletrue
* 
When a new piece of equipment is created, the isConfigured property on the Thing is set to false. This results in the Not Configured status evaluating to true. Once at least one status expression on the piece of equipment has been edited and saved, or the statuses have been reordered, the isConfigured property is automatically set to true.
Prior to the 8.4 release, some status evaluation logic occurred outside of the status expressions defined on equipment. Now, all information used for status evaluation is present in the expressions. For equipment that was present in ThingWorx Apps before the system was upgraded to 8.4, the existing status expressions are updated to include the current evaluation logic, while retaining the previously defined expressions:
If the existing expression was blank, it is updated to be the current default expression for that state.
Any existing expressions for the Warning, Running, and Unplanned Downtime states are concatenated with the IS_DATA_OK function as follows:
"IS_DATA_OK" AND (<existing expression>)
The Planned Downtime state is moved to the first position after Not Configured. The previously existing expressions for the Warning, Running, and Unplanned Downtime states are combined into an OR list, and included with the previously existing expression for Planned Downtime into the updated expression as follows:
NOT "IS_SCHEDULED" OR ("IS_DATA_OK" AND NOT (<Warning expression> OR <Running expression> OR <Unplanned Downtime expression>) AND (<existing expression>)
Was this helpful?