# How to: DoNothing

The manual demonstrates how to filter out part of values using an expression. Before starting, create a data source – a tag named *Sine*, which will generate a source signal, e.g. a sinusoid.&#x20;

Open Monokot Server Administrator and double-click *Scripts* on the *Server Explorer* pane. Click *New Expression* and set the name *HalfSine* for the expression that appears. Insert the following code into the expression code editor:

```javascript
var state = context.data['trig_sine'].state;

if (state.value < 0)
    return MosUtils.doNothing;

return state;
```

Press *Ctrl + Enter* to apply the change in the code editor.

Go to the *Triggers* tab and click *Add Data...*. Select the tag *Sine* as the data source for the trigger. Enter the name (key) *trig\_sine* for the trigger.

![](https://4282443477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3cwznMbQcEQxtnjiRDYX%2Fuploads%2FvMt9Av0lPh9GGi2bijm0%2FHow%20to_%20DoNothing%20\(360041704311\)_image-0.png?alt=media\&token=409148db-e82a-4937-8fb1-a0cac31b655a)

In order for the changes to take effect on the server, click the Sync button. Thus, the expression will filter out all negative values received from the tag. You can read more about the *ValueState* object [<mark style="color:blue;">here</mark>](https://docs.monokot.io/scripts/api/valuestate).

If you set up saving tag values and expressions as time series, you will see the following picture:

![](https://4282443477-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3cwznMbQcEQxtnjiRDYX%2Fuploads%2F6h6o3kfZfilywL7BsKFw%2FHow%20to_%20DoNothing%20\(360041704311\)_image-1.png?alt=media\&token=665df527-45d2-4e84-b13a-99b858dc0c9b)
