# Expression

The Expression object is intended for obtaining information about the expression being executed at the moment.

### Fields <a href="#h.vklr5kew49n5" id="h.vklr5kew49n5"></a>

| **Name**     | **Description**                                                                                                                                    |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| id           | Contains ID (name) of the expression (string).                                                                                                     |
| uid          | Contains global ID of the expression (string).                                                                                                     |
| path         | Contains path to the expression (string).                                                                                                          |
| currentState | Contains an object of [ValueState](https://docs.monokot.io/scripts/api/valuestate) type and is the result of the last execution of the expression. |
| comment      | Contains a comment for the expression.                                                                                                             |

### Examples <a href="#h.p07m351ugldw" id="h.p07m351ugldw"></a>

In the following example, all expressions located in the *Alarms → Area1* group will return *True*, the rest will return *False*.

```javascript
if (context.expression.path.startsWith('Alarms.Area1'))
  return false;
return true;
```

In the example below, the expression will return *True* if the previous result was *False*, otherwise it will return *True*.

```javascript
if (context.expression.currentState.value == false)
  return true;
return false;
```
