> For the complete documentation index, see [llms.txt](https://docs.monokot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monokot.io/scripts/programming-examples/how-to-donothing.md).

# 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.

![](/files/Mwl62X9ew2kt0MV1htdU)

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>](/scripts/api/valuestate.md).

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

![](/files/5r0MASM9CbxtjOWMKM3w)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.monokot.io/scripts/programming-examples/how-to-donothing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
