> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/writing-formulas-in-the-script-editor/what-a-formula-cannot-do.md).

# What a Formula Cannot Do

A formula works out values from the fields of its screen. To protect your company's records and keep Logic ERP running smoothly, a **VB.NET** formula **cannot**:

* read or change records directly (for example with a query),
* read or change files,
* use the network or the internet,
* read computer or user settings, such as the user name or the computer name,
* show windows or messages,
* wait, or start work in the background,
* stop or start a program - this includes the **End** and **Stop** statements on their own,
* call Windows directly, use outside components or load other programs' code by name.

If a formula contains any of these, **Script Watch** and **Save** stop with the message **Not allowed in a formula**, which lists each line concerned with its reason, and the first of them is highlighted. **Check & Fix** lists these lines too.

### **Reasons you may see**

* *reading or changing files is not allowed in a formula*
* *network access is not allowed in a formula*
* *reading computer or user settings is not allowed in a formula*
* *a formula cannot show windows or messages*
* *waiting or background work is not allowed in a formula*
* *stopping or starting a program is not allowed in a formula*
* *calling Windows directly is not allowed in a formula*
* *loading code by name (reflection) is not allowed in a formula*
* *database access is not allowed in a formula*, or a message about a query

### **What is still fine**

* **End If**, **End Select**, **End Function** and the other block endings - only **End** or **Stop** on its own is refused.
* Fields whose names contain these words, such as **FILE\_CHARGES** or **NET\_SALARY**.
* Notes (text after **'**) are not checked, so you can keep an explanation in the formula.
* Words such as File, Net or MsgBox inside a text value in double quotes. A text value that reads like a query is still refused.

A formula saved before this check is not run: the values it should work out are not filled in. Open it in the **Script Editor** to see which lines are the cause.

Ask your Logic ERP support team if a calculation needs a value that is not in the **Field List**.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/writing-formulas-in-the-script-editor/what-a-formula-cannot-do.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
